refreshVersions
refreshVersions copied to clipboard
Migration: Support dependencies inside buildSrc/src/main/kotlin/*.gradle.kts
The plugin "de.fayard.refreshVersions" doesn't appear to work for buildSrc plugins inside a multi-module project, but it would be nice if it could.
Steps to produce scenario:
-
With Gradle 7.2, created a multi-module project with
gradle init
, choosing options 2-3-2-2 (application, Java, yes, Kotlin), and choosing "demo" as the project name and source package. -
Add the following to
./settings.gradle.kts
and./buildSrc/settings.gradle.kts
pluginManagement { plugins { id("de.fayard.refreshVersions") version "0.20.0" } } plugins { id("de.fayard.refreshVersions") }
-
Run the command
gradle refreshVersionsMigrate
-
Open the file
./buildSrc/src/demo/kotlin/demo.java-common-conventions.gradle.kts
. Notice that these versions have not been replaced. Replacing the versions manually with_
doesn't work either.dependencies { constraints { implementation("org.apache.commons:commons-text:1.9") } testImplementation("org.junit.jupiter:junit-jupiter:5.7.2") }
@LouisCAD I'm working on this.
Keen to know if there are any updates here (or workarounds in the meantime) - thanks!
@louiseightsix @imashnake0 No one has worked on this no, we were super busy with Versions Catalog support.
This is our current code for deciding what to migrate.
https://github.com/jmfayard/refreshVersions/blob/00dd569da08daefa59eb60f096a8864b28063b4d/plugins/dependencies/src/main/kotlin/de/fayard/refreshVersions/RefreshVersionsMigrateTask.kt#L257-L266
If someone wants to make it smarter, I'm happy to review a PR!
Any news here?