Open Keith-Albright-Bose opened 3 months ago
The 1.8.21
is what it thinks you are using, which is likely coming from Gradle's kotlin-dsl as a dependency. I'm not sure why the up-to-date would have 2.0.20-Beta2
.
I can point you to my own build where I ignore kotlin for the precompiled script plugins and the main build's configuration. I don't have it show up for me there.
btw, I think the kotlin stdlib is showing up because of this regression. I never found the time to debug it further though.
Thanks! I applied those changes and also limited to the release/debug configs to speed up task time like this:
(kotlin dsl)
// https://github.com/ben-manes/gradle-versions-plugin
tasks.withType<DependencyUpdatesTask>{
filterConfigurations = Spec{
it.name.contains("debugRuntimeClasspath") ||
it.name.contains("debugCompileClasspath") ||
it.name.contains("releaseRuntimeClasspath") ||
it.name.contains("releaseCompileClasspath")
}
}
However, got some strange versions exceeding milestone versions: The following dependencies exceed the version found at the milestone revision level:
com.google.errorprone:error_prone_annotations [2.16 <- 2.9.0] https://errorprone.info
There was also a longish list of dependencies that couldn't be resolved. Usually saw 1 or two.
Turned out these seem to be caused by one or both of these flags in the tasksWithType block checkBuildEnvironmentConstraints = true checkConstraints = true
I removed those and got the results I expected.
Running dependencyUpdates plugin .51 Kotlin DSL multiproject project.
I setup a filter per the documentation. Using build.gradle.kts and tried both reject and rejectVersionIf
// rejectVersionIf { // Versions.isNonStable(candidate) // } }
I pass the candidate to the helper function so I can print debug statements with the candidate.displayName.
The test function I have looks like this:
So in the debug statements I added, it shows that the candidate version is in fact unstable:
org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.0.20-Beta2 isNonStable: version: 2.0.20-Beta2, stableKeyword: false, unstableKeyword: true, isStable: false, >>> isUnstable: true org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.0.20-Beta2 isNonStable: version: 2.0.20-Beta2, stableKeyword: false, unstableKeyword: true, isStable: false, >>> isUnstable: true
Yet in spite of wanting to reject this version, I see this in the dependencyUpdates output unexpectedly:
In the dependencies up to date there is this listing:
Only my project isn't using any Kotlin 2.0 anywhere. The regular dependencies Gradle task does not list this. So the bug seems to be that it thinks we're using Kotlin 2.0 Beta2???
In another instance for a different dependency, the same Beta2 is correctly excluded:
org.jetbrains.kotlin.plugin.serialization:org.jetbrains.kotlin.plugin.serialization.gradle.plugin:2.0.20-Beta2 isNonStable: version: 2.0.20-Beta2, stableKeyword: false, unstableKeyword: true, isStable: false, >>> isUnstable: true
and the dependencyUpdates output for this one: https://kotlinlang.org/