getsentry / sentry-android-gradle-plugin

Gradle plugin for Sentry Android. Upload proguard, debug files, and more.

Home Page:https://docs.sentry.io/platforms/android/gradle/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Access to 'ignoredBuildTypes' exceeds its access rights

sryze opened this issue · comments

Gradle Version

8.2

AGP Version

8.2.2

Code Minifier/Optimizer

None

Version

4.2.0

Sentry SDK Version

7.2.0

Steps to Reproduce

Add this to build.gradle:

sentry {
    ignoredBuildTypes = ['debug']
}

as per documentation.

Expected Result

Expected to compile without warnings

Actual Result

Android Studio shows a warning: Access to 'ignoredBuildTypes' exceeds its access rights

Screenshot from 2024-01-29 22-15-29

Same for ignoredFlavors and ignoredVariants.

hey, this turns out to be an IDEA/AS bug, that still hasn't been fixed: https://youtrack.jetbrains.com/issue/IDEA-270236/Managed-properties-DSL. The problem seems to be Kotlin/Groovy interop not working well.

I think you can workaround it by removing the equal sign for now:

sentry {
    ignoredBuildTypes ['debug']
}

But I'm gonna close this issue as the underlying problem is on the IDE side, hoping they will fix it soon (and it's just a warning, the build is still executing fine). Thanks for reporting!