You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using bootJar task with a layered feature enabled on a project with the custom source set - testIntegration. Everything works as expected and there are no errors of any kind. However, Gradle produces warnings in the output like in the following truncated example:
The testIntegrationCompile configuration has been deprecated for resolution. This will fail with an error in Gradle 7.0 ...
The testIntegrationCompileOnly configuration has been deprecated for resolution. This will fail with an error in Gradle 7.0 ...
The testIntegrationRuntime configuration has been deprecated for resolution. This will fail with an error in Gradle 7.0 ...
After some debugging, I was able to pin the cause at the LayerResolver.processConfiguration() private method. It uses the DEPRECATED_FOR_RESOLUTION_CONFIGURATIONS for filtering Configurations that should not be resolved for dependencies. Since my project contains a custom source set with corresponding configurations extended from testImplementation and testRuntimeOnly, deprecated configurations sneak-in via Gradle's configuration hierarchy.
As bootJar tasks already filters-out hardcoded set of deprecated configuration names, maybe it makes sense to expand this filtering for custom configurations whose names end with Compile, CompileOnly and Runtime. When Gradle 7.0 will be released, I guess warnings will not be present since I'm expecting that Gradle will not include deprecated configurations in the hierarchy built with extendsFrom.
I don't have a simple example for demonstrating the issue, but you can check out this project project and run ./gradlew -p cargotracker/cargotracker-booking-queryside-rdbms-projection-app clean bootJar --warning-mode all from project root. Related build.gradle is here.
Spring Boot: 2.3.1.RELEASE
Gradle: 6.5
JDK: 11.0.7
Tnx.
The text was updated successfully, but these errors were encountered:
wilkinsona
changed the title
Gradle Plugin - layered bootJar tasks causes warnings when custom source set is present in the project
Layered bootJar task causes warnings when custom source set is present in the project
Jul 2, 2020
I'm using
bootJar
task with alayered
feature enabled on a project with the custom source set -testIntegration
. Everything works as expected and there are no errors of any kind. However, Gradle produces warnings in the output like in the following truncated example:After some debugging, I was able to pin the cause at the
LayerResolver.processConfiguration()
private method. It uses theDEPRECATED_FOR_RESOLUTION_CONFIGURATIONS
for filteringConfigurations
that should not be resolved for dependencies. Since my project contains a custom source set with corresponding configurations extended fromtestImplementation
andtestRuntimeOnly
, deprecated configurations sneak-in via Gradle's configuration hierarchy.As
bootJar
tasks already filters-out hardcoded set of deprecated configuration names, maybe it makes sense to expand this filtering for custom configurations whose names end withCompile
,CompileOnly
andRuntime
. When Gradle 7.0 will be released, I guess warnings will not be present since I'm expecting that Gradle will not include deprecated configurations in the hierarchy built withextendsFrom
.I don't have a simple example for demonstrating the issue, but you can check out this project project and run
./gradlew -p cargotracker/cargotracker-booking-queryside-rdbms-projection-app clean bootJar --warning-mode all
from project root. Relatedbuild.gradle
is here.Spring Boot: 2.3.1.RELEASE
Gradle: 6.5
JDK: 11.0.7
Tnx.
The text was updated successfully, but these errors were encountered: