rakutentech / android-buildconfig

Shared (gradle) build configurations for Android and Java libraries
MIT License
21 stars 26 forks source link

[Quality/Findbugs] Relying on `libraryVariants` breaks findbugs config for android application plugin #26

Closed NemoOudeis closed 6 years ago

NemoOudeis commented 6 years ago

Problem

* Where:
Script '/config/quality/findbugs/android.gradle' line: 20

* What went wrong:
A problem occurred configuring project ':sample'.
> Could not get unknown property 'libraryVariants' for object of type com.android.build.gradle.AppExtension.

Solution

Try something like (android.libraryVariant || android.variants) to pass the classpath to findbugs (not sure whether that syntax works in groovy, else we'll have to do it by hand).

NemoOudeis commented 6 years ago

note that this only affects projects using the android application plugin, so a temporary workaround is to not apply the findbug config to app projects. library projects are not affected.

jcayzac commented 6 years ago

This was fixed by 735f0fc