patrikerdes/gradle-use-latest-versions-plugin

useLatestVersions isn't upgrading versions in properties file of a multi-project build as of release 0.2.9

xenomachina opened this issue · 5 comments

We have a multi-project build. Many of our version numbers we keep in gradle.properties at the root project level. eg:

hikaricp_version = 3.3.1
jetbrains_annotations_version = 17.0.0
jooq_version = 3.11.11
kotlin_logging_version = 1.6.26
kotlintest_version = 3.3.2
kotlin_version = 1.3.41
log4j2_slf4j_version = 2.11.2
postgresql_jdbc_version = 42.2.5
slf4j_simple_version = 1.7.26
testcontainers_version = 1.11.3

Dependencies are specified in the sub-projects:

// project-sub/build.gradle
dependencies {
    implementation "com.zaxxer:HikariCP:$hikaricp_version"
    implementation "io.github.microutils:kotlin-logging:$kotlin_logging_version"
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation "org.jetbrains:annotations:$jetbrains_annotations_version"
    implementation "org.jooq:jooq:$jooq_version"

    testImplementation "io.kotlintest:kotlintest-assertions:$kotlintest_version"
    testImplementation "io.kotlintest:kotlintest-core:$kotlintest_version"
    testImplementation "io.kotlintest:kotlintest-runner-junit5:$kotlintest_version"
}

With 0.2.8, these version numbers in the properties file are upgraded correctly. With 0.2.9 through 0.2.12 they aren't.

Thanks for the bug report, it seems this scenario wasn't considered when implementing better support for multi-project builds in 0.2.9.

fdw commented

Has this been fixed?

Fixed in 0.2.14 which is now available

FYI: Found out, that boolean flag is not applied if you use it in configuration like:

useLatestVersions {
    updateRootProperties = true
}

So you have to use cmd line flag gradle useLatestVersion --update-root-properties