Do not depend on deprecated configuration
Vampire opened this issue · 1 comments
The compile
configuration as well as the runtime
configuration (and testCompile
, testRuntime
, ...) are deprecated since Gradle 3.4.
Instead to declare dependencies implementation
and runtimeOnly
(testImplementation
, testRuntimeOnly
, ...) should be used instead.
You should probably also change this in your own build scripts, but what I mean is that you force your consumers to either use the deprecated configuration or to declare any dependencies twice, in implementation
and in server
or agent
, the first for compiling, the second for packaging.
You use configurations.runtime
at https://github.com/rodm/gradle-teamcity-plugin/blob/master/src/main/groovy/com/github/rodm/teamcity/TeamCityServerPlugin.groovy#L85 and https://github.com/rodm/gradle-teamcity-plugin/blob/master/src/main/groovy/com/github/rodm/teamcity/TeamCityAgentPlugin.groovy#L81, but instead you should use configurations.runtimeClasspath
which includes runtime
(and thus compile),
implementation(and thus also
compile) and
runtimeOnly`.
You can see the detailed information at https://docs.gradle.org/current/userguide/java_plugin.html#tab:configurations in the text and the figure.
I've updated the plugin, build scripts, and samples.