Gradle plugin to use the error-prone compiler for Java
Avoid forking if Gradle already has appropriate --add-exports
/--add-opens
passed through the org.gradle.jvmargs
property.
When using JDK 16+, users configuring additional JVM arguments on their compile tasks and expecting a forked compiler daemon from the plugin should now explicitly configure the tasks to fork if they want their JVM arguments to be enforced in all cases.
Fixes Gradle Module Metadata to target Java 8 (#73), otherwise strictly identical to 3.0.0.
The Gradle Module Metadata for the 3.0.0 release includes a org.gradle.jvm.version
attribute with an incorrect value. This will break builds using a JDK < 17 (#73). This is fixed in version 3.0.1.
isCompilingTestOnlyCode
is no longer configured based on the type of variant.errorproneJavac
configuration (72a842caeb9b65600f21433ee0f025a7e4f92aad): ErrorProne no longer supports JDK 8 (since 2.11.0), so this dependency won't change, and can thus be defaulted to the latest version (released nearly 5 years ago)jvmArgumentProvides
in Gradle 7.1+ (ffef94dcdfedd1c95464394411922c8ee9dc7c06)You can safely remove errorproneJavac("com.google.errorprone:javac:9+181-r4173-1")
from your dependencies as this is now added by default.
Also make sure you do not configure any fork option while not enabling forking, that would cause any error if forking was enabled, as those options will be retained when the plugin configures forking.
Fix configuration-cache compatibility (#59, bb2c9c7238b933dc45ad5453ab0b74522824c4ac)
Add --add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED
when using JDK 16+; this fixes an IllegalAccessError
with some ErrorProne checks (#58, https://github.com/google/error-prone/issues/2250, 4494aa521c3e7b9d37003cda4045cadad6841533)
com.android.feature
and com.android.instantapp
plugins (aab1b9451edc743fd92bf4a17a235c6d2a7f7881)Fix regression in v1.3.0 where the errorproneJavac
configuration was resolved even when not using JDK 8, in Gradle 6.7+ (as a side-effect to adding toolchains support). This would lead to either resolving an unnecessary 6.5Mb file, or printing a warning that com.google.errorprone:javac
is missing in errorproneJavac
.
Add KDoc to the DSL extension, in the hope that it's picked up by IDEs (no additional artifact is generated)
Add support for Gradle 6.7 Toolchains
Add support for -XepDisableAllWarnings
(d467eb2f039d017b5f91b9a19ef3386575c29a7e)
applicationVariants
when using com.android.dynamic-feature
plugin (1f3c3d96542760f38d794f8b3e39b8489998c487)