-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Description
While running e.g. ./gradlew precommit we see about 120 deprecation warnings of
The compileOnly configuration has been deprecated for resolution.
From investigating the build I found three places that cause a direct resolution of this configuration:
ThirdPartyAuditTask(see https://github.com/elastic/elasticsearch/blob/master/buildSrc/src/main/java/org/elasticsearch/gradle/precommit/ThirdPartyAuditTask.java#L177-L180)DependenciesInfoTask(see)elasticsearch/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy
Line 302 in c0ee68b
task.compileOnlyConfiguration = project.configurations.getByName(JavaPlugin.COMPILE_ONLY_CONFIGURATION_NAME) DependencyLicensesTask(see configuration at)elasticsearch/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy
Lines 292 to 295 in c0ee68b
project.tasks.withType(DependencyLicensesTask).named('dependencyLicenses').configure { it.dependencies = project.configurations.getByName(JavaPlugin.RUNTIME_CLASSPATH_CONFIGURATION_NAME).fileCollection { Dependency dependency -> dependency.group.startsWith('org.elasticsearch') == false } - project.configurations.getByName(JavaPlugin.COMPILE_ONLY_CONFIGURATION_NAME)
In all of those 3 places we subtract the compileOnly dependencies from the runtimeClasspath configuration. I wonder what is the scenario here that actually makes this happen or a concern? Shouldn't by design all compileOnly entries never end up on the runtimeClasspath?
Here's an overview of how gradle configurations are related by default: https://docs.gradle.org/6.4.1/userguide/java_library_plugin.html#sec:java_library_configurations_graph