Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version comments are not aligned with original version in version catalog #663

Open
Vampire opened this issue Feb 6, 2023 · 1 comment

Comments

@Vampire
Copy link
Contributor

Vampire commented Feb 6, 2023

When running refreshVersions with a version catalog, the version comments are not aligned with the original version like in other places.
It looks like this:

build-kotlin = "1.7.10"
##        ⬆ = "1.7.20"
##        ⬆ = "1.7.21"
##        ⬆ = "1.7.22"
##        ⬆ = "1.8.0"
##        ⬆ = "1.8.10"

while it probably should look like this:

build-kotlin = "1.7.10"
##         ⬆ = "1.7.20"
##         ⬆ = "1.7.21"
##         ⬆ = "1.7.22"
##         ⬆ = "1.8.0"
##         ⬆ = "1.8.10"
@Vampire
Copy link
Contributor Author

Vampire commented Feb 8, 2023

Here a work-around:

gradle.rootProject {
    tasks.configureEach {
        if (name == "refreshVersions") {
            doLast {
                file("gradle/libs.versions.toml").apply {
                    readText()
                        .replace("⬆ =", " ⬆ =")
                        .also { writeText(it) }
                }
            }
        }
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant