Skip to content
Open
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
1 change: 1 addition & 0 deletions packages/core/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,5 @@ dependencies {
compileOnly files('libs/replay-stubs.jar')
implementation 'com.facebook.react:react-native:+'
api 'io.sentry:sentry-android:8.32.0'
debugImplementation 'io.sentry:sentry-spotlight:8.32.0'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Using debugImplementation for the sentry-spotlight dependency in a library module will prevent it from being included in consuming apps, breaking the feature.
Severity: MEDIUM

Suggested Fix

To make the dependency available to consuming applications, change debugImplementation to api. To conditionally include it only for debug builds, this logic should be handled in the consuming application's build.gradle, not the library's. The library should provide the dependency transitively.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: packages/core/android/build.gradle#L59

Potential issue: The `sentry-spotlight` dependency is added using `debugImplementation`
in the `build.gradle` file of an Android library module. Dependencies added with
`debugImplementation` in a library are not transitive, meaning they are not passed on to
the application that consumes the library. Consequently, when a developer enables the
Spotlight feature in their app, the required `sentry-spotlight` classes will be missing
at runtime. This will cause the Spotlight feature to not function as intended for any
application using this SDK.

Did we get this right? 👍 / 👎 to inform future reviews.

}
Loading