Splitties / refreshVersions

Life is too short to google for dependencies and versions
https://splitties.github.io/refreshVersions/
MIT License
1.65k stars 107 forks source link

Using versionFor in build.gradle.kts for a key in version.properties still adds unused comment #677

Open podollb opened 1 year ago

podollb commented 1 year ago

The refreshVersions gradle task adds ## unused comment above keys that are explicitly used via the versionFor notiation.

⚠️ Current behavior

I didn't expect that the ## unused comment would appear above that key/value in the version.properties file.

✅ Expected behavior

I think refreshVersions should detect the use of that key (in the versionFor) and not add the ## unsed comment above it in version.properties.

💣 Steps to reproduce

Add a key/value to version.properties like version.foo=1.2.3 Use that in your build.gradle.kts file via the versionFor("version.foo") notation Run ./gradlew refreshVersions

The ## unused comment appears above that key/value in the version.properties file.

📱 Tech info

podollb commented 2 months ago

Any updates on this?

LouisCAD commented 2 months ago

Try putting a dependency notation instead

podollb commented 2 months ago

I'm not sure I understand, instead of versionFor("version.foo") what should I use in my logic in my gradle build file? I'm using the value in some conditional logic.