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

Bug: Multiple versions in gradle.properties #10

Closed
usr42 opened this issue Nov 14, 2018 · 1 comment · Fixed by #11
Closed

Bug: Multiple versions in gradle.properties #10

usr42 opened this issue Nov 14, 2018 · 1 comment · Fixed by #11

Comments

@usr42
Copy link
Contributor

usr42 commented Nov 14, 2018

Hi @patrikerdes,

I found another issue. When the version variables are set in the gradle.properties file only the last version is updated.

Here is an example:
See https://github.com/usr42/use-latest-issues/tree/multiple-versions-in-gradle_properties

gradle.properties:

junitVersion = 4.0
hibernateValidatorVersion=6.0.12.Final

build.gradle:

plugins {
    id 'org.jetbrains.kotlin.jvm' version '1.3.10'
    id "se.patrikerdes.use-latest-versions" version "0.2.6"
    id 'com.github.ben-manes.versions' version '0.20.0'
}

repositories {
    mavenCentral()
}

dependencies {
    compile "org.hibernate:hibernate-validator:${hibernateValidatorVersion}"
    testCompile "junit:junit:$junitVersion"
}

When running ./gradlew useLatestVersions && ./gradlew useLatestVersionsCheckthe check is failing:

> Task :useLatestVersionsCheck FAILED
useLatestVersions failed to update 1 dependency to the latest version:
 - junit:junit [4.0 -> 4.12]

The gradle.properties was updated to:

junitVersion = 4.0
hibernateValidatorVersion=6.0.13.Final

Only the last variable (here hibernateValidatorVersion) is updated.
If I change the ordering of the variables in gradle.properties, then junitVersion (now the last variable) is updated, but not hibernateValidatorVersion.

Thanks and cheers,
usr42/Balthasar

@usr42
Copy link
Contributor Author

usr42 commented Nov 14, 2018

I've opened a PR to fix this issue: #11

It was only updating the last version, when there was now new line after the last version.

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

Successfully merging a pull request may close this issue.

1 participant