refreshVersions
refreshVersions copied to clipboard
Support plugin versions in version catalog
- [x] I have read the guidelines for submitting issues
I'm probably missing something, but just following the docs...:
🐛 Describe the problem
- Plugin versions in
gradle/libs.versions.toml
do not get 'refreshed' - VersionCatalogOnly still needs a versions.properties file
⚠️ Current behavior
- When migrating with
VersionCatalogOnly
theversions.properties
is still required - When running
refreshVersions
, the versions for plugins in thegradle/libs.versions.toml
do not get comments for the newest versions
✅ Expected behavior
-
VersionCatalogOnly
should only use the version catalog, not theversion.properties
-
refreshVersions
should refresh plugins as well. It does so in theversions.properties
but this file is not expected at all (#640)
💣 Steps to reproduce
- Create a new gradle/kotlin project, e.g.: https://start.spring.io/#!type=gradle-project-kotlin&language=kotlin&platformVersion=3.0.4&packaging=jar&jvmVersion=17&groupId=com.example&artifactId=demo&name=demo&description=Demo%20project%20for%20Spring%20Boot&packageName=com.example.demo&dependencies=configuration-processor,devtools,native
- Add the refresh versions plugin to the
settings.gradle.kts
file - Run
./gradlew refreshVersionsMigrate --mode=VersionCatalogOnly
- Run
./gradlew refreshVersions
- 🛑 In
gradle/libs.versions.toml
, the versions of plugins are not refreshed - 🛑 When deleting the
versions.properties
file, the build fails (Plugin [id: 'org.springframework.boot'] was not found in any of the following sources
)
Testing a bit further it seemed to me that the plugin always used the versions.properties
file, not the actual version catalog. I curated the libs.versions.toml file by hand and switched to version-catalog-update-plugin which works great but for https://github.com/gradle/gradle/issues/22797 (which should soon be fixed)