I currently disabled failOnError on javadoc, as the compilation
configuration is not applied to javadoc's classpath.
Gradle 6 introduced the concept of resolvable and consumable,
so I would recommend we revisit it when we are on Gradle 6.
I tested locally by mavenPublishToLocal using a standalone sample
app with android instrumentation tests. The tests can compile
successfully with proper dependency.
There are some minor changes:
Prompted by IDE that Closure.DELEGATE_FIRST can be inlined
The build failure was likely due to the legacy errorprone gradle plugin, which was more than 3 years ago. https://plugins.gradle.org/plugin/net.ltgt.errorprone/0.0.13
I upgraded errorprone gradle plugin to a recent version, and also bump the AGP 3.6 and Gradle 5.6.4 because the errorprone version requires a minimum Gradle 5.2. https://github.com/tbroyer/gradle-errorprone-plugin/releases/tag/v0.8
I also used the maven publish integration from AGP by using components.release https://developer.android.com/studio/build/maven-publish-plugin
I currently disabled
failOnError
on javadoc, as the compilation configuration is not applied to javadoc's classpath. Gradle 6 introduced the concept of resolvable and consumable, so I would recommend we revisit it when we are on Gradle 6.I tested locally by mavenPublishToLocal using a standalone sample app with android instrumentation tests. The tests can compile successfully with proper dependency.
There are some minor changes: