diff --git a/buildSrc/src/main/kotlin/embrace-test-defaults.gradle.kts b/buildSrc/src/main/kotlin/embrace-test-defaults.gradle.kts index 9ddf88f36a..6b296f9cd2 100644 --- a/buildSrc/src/main/kotlin/embrace-test-defaults.gradle.kts +++ b/buildSrc/src/main/kotlin/embrace-test-defaults.gradle.kts @@ -68,5 +68,6 @@ project.tasks.withType(KotlinCompile::class.java).configureEach { languageVersion = "1.8" jvmTarget = JavaVersion.VERSION_1_8.toString() freeCompilerArgs = freeCompilerArgs + "-Xexplicit-api=strict" + allWarningsAsErrors = true } } diff --git a/embrace-android-core/build.gradle.kts b/embrace-android-core/build.gradle.kts index a17df2a359..0166fe6eb5 100644 --- a/embrace-android-core/build.gradle.kts +++ b/embrace-android-core/build.gradle.kts @@ -35,12 +35,11 @@ dependencies { compileOnly(libs.lifecycle.common.java8) implementation(libs.lifecycle.process) - testImplementation(platform(libs.opentelemetry.bom)) testImplementation(libs.opentelemetry.api) testImplementation(libs.opentelemetry.sdk) testImplementation(libs.opentelemetry.semconv) testImplementation(libs.opentelemetry.semconv.incubating) testImplementation(libs.lifecycle.common.java8) - implementation(libs.lifecycle.process) + testImplementation(libs.kotlin.reflect) } diff --git a/embrace-android-core/src/main/kotlin/io/embrace/android/embracesdk/internal/injection/AndroidServicesModuleImpl.kt b/embrace-android-core/src/main/kotlin/io/embrace/android/embracesdk/internal/injection/AndroidServicesModuleImpl.kt index 9649b29ada..b63be90553 100644 --- a/embrace-android-core/src/main/kotlin/io/embrace/android/embracesdk/internal/injection/AndroidServicesModuleImpl.kt +++ b/embrace-android-core/src/main/kotlin/io/embrace/android/embracesdk/internal/injection/AndroidServicesModuleImpl.kt @@ -1,3 +1,5 @@ +@file:Suppress("DEPRECATION") + package io.embrace.android.embracesdk.internal.injection import android.preference.PreferenceManager diff --git a/embrace-android-core/src/test/java/io/embrace/android/embracesdk/internal/capture/session/EmbraceSessionPropertiesTest.kt b/embrace-android-core/src/test/java/io/embrace/android/embracesdk/internal/capture/session/EmbraceSessionPropertiesTest.kt index 6b0aedc820..65a1cd2c18 100644 --- a/embrace-android-core/src/test/java/io/embrace/android/embracesdk/internal/capture/session/EmbraceSessionPropertiesTest.kt +++ b/embrace-android-core/src/test/java/io/embrace/android/embracesdk/internal/capture/session/EmbraceSessionPropertiesTest.kt @@ -1,3 +1,5 @@ +@file:Suppress("DEPRECATION") + package io.embrace.android.embracesdk.internal.capture.session import android.content.Context diff --git a/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/capture/crumbs/PushNotificationCaptureService.kt b/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/capture/crumbs/PushNotificationCaptureService.kt index 9163523b95..321e63e001 100644 --- a/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/capture/crumbs/PushNotificationCaptureService.kt +++ b/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/capture/crumbs/PushNotificationCaptureService.kt @@ -29,7 +29,6 @@ public class PushNotificationCaptureService( private const val RESERVED_MESSAGE_TYPE = "message_type" private const val RESERVED_COLLAPSE_KEY = "collapse_key" private const val RESERVED_GOOGLE_MESSAGE_ID = "google.message_id" - private const val RESERVED_GOOGLE_DELIVERED_PRIORITY = "google.delivered_priority" /** * This is so to have compatibility with com.google.firebase.messaging.RemoteMessage. @@ -67,7 +66,6 @@ public class PushNotificationCaptureService( * @param topic the notification topic (if a user subscribed to one), or null * @param id A unique ID identifying the message * @param notificationPriority the priority of the message (as resolved on the device) - * @param messageDeliveredPriority the priority of the message (as resolved on the server) * @param type the notification type */ public fun logPushNotification( @@ -76,7 +74,6 @@ public class PushNotificationCaptureService( topic: String?, id: String?, notificationPriority: Int?, - messageDeliveredPriority: Int, type: PushNotificationBreadcrumb.NotificationType ) { pushNotificationDataSource?.logPushNotification(title, body, topic, id, notificationPriority, type) @@ -103,9 +100,6 @@ public class PushNotificationCaptureService( // ** // topic = getString(RESERVED_FROM), id = getString(RESERVED_GOOGLE_MESSAGE_ID), - messageDeliveredPriority = getMessagePriority( - getString(RESERVED_GOOGLE_DELIVERED_PRIORITY) - ), type = determineNotificationType(this) ) } diff --git a/embrace-android-sdk/src/integrationTest/kotlin/io/embrace/android/embracesdk/IntegrationTestRule.kt b/embrace-android-sdk/src/integrationTest/kotlin/io/embrace/android/embracesdk/IntegrationTestRule.kt index 9d30e4e7f2..7186c75528 100644 --- a/embrace-android-sdk/src/integrationTest/kotlin/io/embrace/android/embracesdk/IntegrationTestRule.kt +++ b/embrace-android-sdk/src/integrationTest/kotlin/io/embrace/android/embracesdk/IntegrationTestRule.kt @@ -1,3 +1,5 @@ +@file:Suppress("DEPRECATION") + package io.embrace.android.embracesdk import android.content.Context diff --git a/embrace-android-sdk/src/main/java/io/embrace/android/embracesdk/Embrace.java b/embrace-android-sdk/src/main/java/io/embrace/android/embracesdk/Embrace.java index f298df451a..353a8dc957 100644 --- a/embrace-android-sdk/src/main/java/io/embrace/android/embracesdk/Embrace.java +++ b/embrace-android-sdk/src/main/java/io/embrace/android/embracesdk/Embrace.java @@ -190,6 +190,7 @@ public boolean removeSessionProperty(@NonNull String key) { @Override @Nullable + @Deprecated public Map getSessionProperties() { return impl.getSessionProperties(); } diff --git a/embrace-android-sdk/src/test/java/io/embrace/android/embracesdk/fakes/injection/FakeCoreModule.kt b/embrace-android-sdk/src/test/java/io/embrace/android/embracesdk/fakes/injection/FakeCoreModule.kt index 4bcd3692b9..b9b8ae864f 100644 --- a/embrace-android-sdk/src/test/java/io/embrace/android/embracesdk/fakes/injection/FakeCoreModule.kt +++ b/embrace-android-sdk/src/test/java/io/embrace/android/embracesdk/fakes/injection/FakeCoreModule.kt @@ -35,6 +35,7 @@ public class FakeCoreModule( public companion object { + @Suppress("DEPRECATION") private val fakePackageInfo = PackageInfo().apply { packageName = "com.fake.package" versionName = "2.5.1" diff --git a/embrace-android-sdk/src/test/java/io/embrace/android/embracesdk/internal/api/EmbraceInternalInterfaceImplTest.kt b/embrace-android-sdk/src/test/java/io/embrace/android/embracesdk/internal/api/EmbraceInternalInterfaceImplTest.kt index 4ca83b6aa1..93d296f9fa 100644 --- a/embrace-android-sdk/src/test/java/io/embrace/android/embracesdk/internal/api/EmbraceInternalInterfaceImplTest.kt +++ b/embrace-android-sdk/src/test/java/io/embrace/android/embracesdk/internal/api/EmbraceInternalInterfaceImplTest.kt @@ -1,3 +1,5 @@ +@file:Suppress("DEPRECATION") + package io.embrace.android.embracesdk.internal.api import android.net.Uri diff --git a/embrace-android-sdk/src/test/java/io/embrace/android/embracesdk/internal/api/UninitializedSdkInternalInterfaceImplTest.kt b/embrace-android-sdk/src/test/java/io/embrace/android/embracesdk/internal/api/UninitializedSdkInternalInterfaceImplTest.kt index 2c131393ae..db9dba74bb 100644 --- a/embrace-android-sdk/src/test/java/io/embrace/android/embracesdk/internal/api/UninitializedSdkInternalInterfaceImplTest.kt +++ b/embrace-android-sdk/src/test/java/io/embrace/android/embracesdk/internal/api/UninitializedSdkInternalInterfaceImplTest.kt @@ -1,3 +1,5 @@ +@file:Suppress("DEPRECATION") + package io.embrace.android.embracesdk.internal.api import io.embrace.android.embracesdk.LogType diff --git a/embrace-test-fakes/src/main/kotlin/io/embrace/android/embracesdk/fakes/FakeEmbraceInternalInterface.kt b/embrace-test-fakes/src/main/kotlin/io/embrace/android/embracesdk/fakes/FakeEmbraceInternalInterface.kt index 4545156088..6f2b7925b6 100644 --- a/embrace-test-fakes/src/main/kotlin/io/embrace/android/embracesdk/fakes/FakeEmbraceInternalInterface.kt +++ b/embrace-test-fakes/src/main/kotlin/io/embrace/android/embracesdk/fakes/FakeEmbraceInternalInterface.kt @@ -1,3 +1,5 @@ +@file:Suppress("DEPRECATION") + package io.embrace.android.embracesdk.fakes import io.embrace.android.embracesdk.LogType