Splitties / refreshVersions

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

Bug: property 'defaultVersionCatalogFile$refreshVersions_core' specifies file '${projectRoot}/gradle/libs.versions.toml' which doesn't exist #698

Closed charles-santos-wd closed 10 months ago

charles-santos-wd commented 10 months ago

⚠️ Current behavior

Task refreshVersions fails:

> Task :refreshVersions FAILED

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':refreshVersions' (type 'RefreshVersionsTask').
  - In plugin 'de.fayard.refreshVersions.core.RefreshVersionsCorePlugin' type 'de.fayard.refreshVersions.core.RefreshVersionsTask' property 'defaultVersionCatalogFile$refreshVersions_core' specifies file '/Users/charles.santos/code/yuzu-libs/gradle/libs.versions.toml' which doesn't exist.

    Reason: An input file was expected to be present but it doesn't exist.

    Possible solutions:
      1. Make sure the file exists before the task is called.
      2. Make sure that the task which produces the file is declared as an input.

    For more information, please refer to https://docs.gradle.org/8.2.1/userguide/validation_problems.html#input_file_does_not_exist in the Gradle documentation.

✅ Expected behavior

Task refreshVersions should do what it's expected to do — update my versions.properties file with dependency upgrades.

💣 Steps to reproduce

It looks like it's as simple as using just versions.properties in 0.51.0 and upgrading to 0.60.0. I performed the upgrade in another one of my projects and I ran into the same failure.

Updated with reproduction repo:

Clone https://github.com/charles-santos-wd/refreshVersions-698 , and run ./gradlew refreshVersions

📱 Tech info

No build scans as it's a private corporate repository 😞

Workaround

Add

featureFlags {
    disable(FeatureFlag.VERSIONS_CATALOG)
}

to refreshVersions { ... } config in settings.gradle.kts to forcibly turn off the Version Catalog feature.

charles-santos-wd commented 10 months ago

Updated with a reproduction repo

LouisCAD commented 10 months ago

Should have written that I was able to reproduce myself. Fix incoming :)