Skip to content

Commit

Permalink
build: fix misc warnings (#1286)
Browse files Browse the repository at this point in the history
Rebased by @bidetofevil
  • Loading branch information
fractalwrench authored Aug 26, 2024
1 parent 832cf5a commit a258731
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 8 deletions.
1 change: 1 addition & 0 deletions buildSrc/src/main/kotlin/embrace-test-defaults.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
3 changes: 1 addition & 2 deletions embrace-android-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("DEPRECATION")

package io.embrace.android.embracesdk.internal.injection

import android.preference.PreferenceManager
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("DEPRECATION")

package io.embrace.android.embracesdk.internal.capture.session

import android.content.Context
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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(
Expand All @@ -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)
Expand All @@ -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)
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("DEPRECATION")

package io.embrace.android.embracesdk

import android.content.Context
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ public boolean removeSessionProperty(@NonNull String key) {

@Override
@Nullable
@Deprecated
public Map<String, String> getSessionProperties() {
return impl.getSessionProperties();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("DEPRECATION")

package io.embrace.android.embracesdk.internal.api

import android.net.Uri
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("DEPRECATION")

package io.embrace.android.embracesdk.internal.api

import io.embrace.android.embracesdk.LogType
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("DEPRECATION")

package io.embrace.android.embracesdk.fakes

import io.embrace.android.embracesdk.LogType
Expand Down

0 comments on commit a258731

Please sign in to comment.