When should we use ‘java’ plugin and when ‘java-library’ plugin? The user guide chapter is not clear about it. Is the future direction that ‘java’ will get deprecated in favor of ‘java-library’ plugin which has fantastic benefits like compile avoidance and cleaner classpaths.
Our use case at LinkedIn is following: should we automatically apply ‘java-library’ plugin to all our few thousand projects that currently use ‘java’? Is this a compatible change that we can safely do?
The docs say that: “compile, testCompile, runtime and testRuntime configurations inherited from the Java plugin are still available but are deprecated”. Does it mean that in the future version of Gradle, the build will fail when a “java-library” project still has dependencies declared in the deprecated configurations? For us it is important because we can evaluate the future migration cost.
Thank you in advance for pointers!
PS. Suggestion: mention in the doc that ‘java-library’ applies ‘java’.