Open stefan6419846 opened 1 year ago
We copy and resolve all of your project configurations. So this is benign if you upgrade as it is being picked up dynamically. Also, I believe if you use the newer Java platform plugins then they lack the legacy configurations so it won’t show up.
Shows up for me as well with Gradle 8.1.1 and a simple gradle init
project. Not sure what is meant with "newer Java platform plugins" – if you use the latest Gradle it will use the latest Java platform plugin, right? Since that is bundled?
The Java plugin was reorganized so it’s usage is discouraged.
As indicated above, this plugin adds basic building blocks for working with JVM projects. Its feature set has been superseded by other plugins, offering more features based on your project type. Instead of applying it directly to your project, you should look into the java-library or application plugins or one of the supported alternative JVM language.
Ahh, I see what you're saying now. However, it seems to happen also with the application
plugin – this Gradle file reproduces it:
plugins {
id 'application'
id 'com.github.ben-manes.versions' version "0.46.0"
}
repositories {
mavenCentral()
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.1'
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
application {
mainClass = 'tech.skagedal.gradleinit.App'
}
tasks.named('test') {
useJUnitPlatform()
}
But I guess this is an annoyance we'll just have to live with, and it will go away once these configurations are removed from Gradle? Or would there be a way to tell Gradle to suppress these warnings on the copied configurations?
At times I’ve thought about a user supplied configuration filter, but never found a use case beyond suppressing a warning. That seemed more errorprone than helpful due to likely misuse. I often run with —quiet (-q) which might hide these, which would be a good workaround for now.
I often run with —quiet (-q) which might hide these, which would be a good workaround for now.
Hey @ben-manes you might be running with -q
, but as platform engineers (an audience of this plugin) we're trying to use the plugin AND also maintain the builds. However the amount of noise generated by this plugin makes it impossible to find actual build issues, here's an example:
Let's say there's a warning in that build, which actually is using broken behavior, and we want to fix. We need to see the stack trace of it, but it's hidden among the other literally 10000 issues generated by #749 and #680, and this is not even a big project. The only very lucky thing is that this is isolated to actually running the plugin's tasks, so it's not blocking other maintenance.
There is no Gradle metadata for us to inspect on to ignore those, but you could use filterConfigurations
to skip them explicitly.
Could we filter on these?
Running the plugin (
./gradlew dependencyUpdates --warning-mode all
) with current Gradle 8.0.2 raises the following warnings:With stacktrace enabled: stacktrace.txt