Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to compileOnly dependencies in sentry-compose #2578

Merged
merged 5 commits into from
Mar 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
- Allow `0.0` error sample rate ([#2573](https://github.com/getsentry/sentry-java/pull/2573))
- Fix memory leak in WebFlux related to an ever growing stack ([#2580](https://github.com/getsentry/sentry-java/pull/2580))
- Use the same hub in WebFlux exception handler as we do in WebFilter ([#2566](https://github.com/getsentry/sentry-java/pull/2566))
- Switch upstream Jetpack Compose dependencies to `compileOnly` in `sentry-compose-android` ([#2578](https://github.com/getsentry/sentry-java/pull/2578))
- NOTE: If you're using Compose Navigation/User Interaction integrations, make sure to have the following dependencies on the classpath as we do not bring them in transitively anymore:
- `androidx.navigation:navigation-compose:`
- `androidx.compose.runtime:runtime:`
- `androidx.compose.ui:ui:`

## 6.14.0

Expand Down
8 changes: 4 additions & 4 deletions sentry-compose/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@ kotlin {
sourceSets {
val commonMain by getting {
dependencies {
api(compose.runtime)
api(compose.ui)
compileOnly(compose.runtime)
compileOnly(compose.ui)

implementation(Config.Libs.kotlinStdLib)
api(projects.sentryComposeHelper)
}
}
Expand All @@ -50,7 +49,7 @@ kotlin {
api(projects.sentry)
api(projects.sentryAndroidNavigation)

api(Config.Libs.composeNavigation)
compileOnly(Config.Libs.composeNavigation)
implementation(Config.Libs.lifecycleCommonJava8)
}
}
Expand All @@ -59,6 +58,7 @@ kotlin {
implementation(Config.TestLibs.kotlinTestJunit)
implementation(Config.TestLibs.mockitoKotlin)
implementation(Config.TestLibs.mockitoInline)
implementation(Config.Libs.composeNavigation)
}
}
}
Expand Down
7 changes: 7 additions & 0 deletions sentry-compose/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
-keep class io.sentry.compose.gestures.ComposeGestureTargetLocator { <init>(...); }
-keepnames interface androidx.compose.ui.node.Owner

# R8 will warn about missing classes if people don't have androidx.compose-navigation on their
# classpath, but this is fine, these classes are used in an internal class which is only used when
# someone is using withSentryObservableEffect extension function (which, in turn, cannot be used
# without having androidx.compose-navigation on the classpath)
-dontwarn androidx.navigation.NavController$OnDestinationChangedListener
-dontwarn androidx.navigation.NavController

# To ensure that stack traces is unambiguous
# https://developer.android.com/studio/build/shrink-code#decode-stack-trace
-keepattributes LineNumberTable,SourceFile
Expand Down
2 changes: 1 addition & 1 deletion sentry/src/main/java/io/sentry/SentryOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -1660,7 +1660,7 @@ public void setProfilesSampler(final @Nullable ProfilesSamplerCallback profilesS

/**
* Sets the profilesSampleRate. Can be anything between 0.0 and 1.0 or null (default), to disable
* it. Its dependent on the {{@link SentryOptions#setTracesSampleRate(Double)} } If a transaction
* it. It's dependent on the {{@link SentryOptions#setTracesSampleRate(Double)} } If a transaction
* is sampled, then a profile could be sampled with a probability given by profilesSampleRate.
*
* @param profilesSampleRate the sample rate
Expand Down