sentry-android-gradle-plugin icon indicating copy to clipboard operation
sentry-android-gradle-plugin copied to clipboard

Applying io.sentry.kotlin.compiler.gradle on a module with no @Composable functions throws NPE

Open devPalacio opened this issue 1 year ago • 1 comments

Gradle Version

8.5

AGP Version

8.2.1

Code Minifier/Optimizer

R8

Version

4.4.0

Sentry SDK Version

7.6.0

Steps to Reproduce

  1. Create a library module with compose = true but no functions annotated with Composable
  2. Apply io.sentry.kotlin.compiler.gradle and add io.sentry:sentry-compose-android as dependency
  3. Compile the module

Expected Result

Module compiles or throws a more helpful error message.

Actual Result

module:compileDebugKotlin FAILED        
e: java.lang.NullPointerException        
        at io.sentry.compose.JetpackComposeTracingIrExtension.generate(JetpackComposeTracingIrExtension.kt:56)

devPalacio avatar Apr 02 '24 21:04 devPalacio

Thanks for reporting @devPalacio - we'll have a fix soon

kahest avatar Apr 04 '24 10:04 kahest