diff --git a/README.md b/README.md index 7dc7d5f..a619997 100644 --- a/README.md +++ b/README.md @@ -39,9 +39,9 @@ buildscript { maven { url "https://plugins.gradle.org/m2/" } } dependencies { - classpath 'eu.davidea:grabver:0.4.1' + classpath 'eu.davidea:grabver:0.5.0' // or with Gradle Plugins Repository - classpath "gradle.plugin.eu.davidea:grabver:0.4.1" + classpath "gradle.plugin.eu.davidea:grabver:0.5.0" } } ``` diff --git a/build-test.gradle b/build-test.gradle index e05433b..316c322 100644 --- a/build-test.gradle +++ b/build-test.gradle @@ -2,12 +2,23 @@ apply plugin: 'java' apply plugin: 'groovy' apply plugin: 'eu.davidea.grabver' +/* + * INSTRUCTIONS to test new Version: + * - Change versions + * - Use mavenLocal() in repositories + * - Execute: + * gradle install + * - Specify the build file (--build-file): + * gradle -b build-test.gradle + */ buildscript { repositories { + jcenter() mavenLocal() } + //noinspection GroovyAssignabilityCheck dependencies { - classpath 'eu.davidea:grabver:0.4.1' + classpath 'eu.davidea:grabver:0.5.0' } } diff --git a/build.gradle b/build.gradle index 4aef750..e5508a4 100644 --- a/build.gradle +++ b/build.gradle @@ -25,6 +25,7 @@ dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile gradleApi() compile localGroovy() + compile 'nu.studer:java-ordered-properties:1.0.1' testCompile gradleTestKit() testCompile group: 'junit', name: 'junit', version: '4.12' @@ -38,7 +39,7 @@ ext { // Library Repository libraryName = 'GrabVer' - libraryVersion = '0.4.1' + libraryVersion = '0.5.0' displayName = 'Gradle Automatic Build Versioning Plugin' libraryDescription = 'An easy Gradle plugin that follows semver.org rules to automatically generate the Patch version, Build number and Code version, while Major, Minor and Pre-Release suffix remain under our control.' libraryLabels = ['semver', 'version', 'versioning', 'build-versioning', 'automatic-versioning', 'intellij-idea', 'android-studio', 'auto-reset'] diff --git a/module_a/build.gradle b/module_a/build.gradle index 71746b2..bd284c1 100644 --- a/module_a/build.gradle +++ b/module_a/build.gradle @@ -2,10 +2,11 @@ apply plugin: 'eu.davidea.grabver' buildscript { repositories { + jcenter() mavenLocal() } dependencies { - classpath 'eu.davidea:grabver:0.4.1' + classpath 'eu.davidea:grabver:0.5.0' } } diff --git a/module_b/build.gradle b/module_b/build.gradle index bec5ac5..5cded20 100644 --- a/module_b/build.gradle +++ b/module_b/build.gradle @@ -2,10 +2,11 @@ apply plugin: 'eu.davidea.grabver' buildscript { repositories { + jcenter() mavenLocal() } dependencies { - classpath 'eu.davidea:grabver:0.4.1' + classpath 'eu.davidea:grabver:0.5.0' } } diff --git a/src/test/groovy/eu/davidea/gradle/GrabVerTest.groovy b/src/test/groovy/eu/davidea/gradle/GrabVerTest.groovy index 38b05f2..ec89458 100644 --- a/src/test/groovy/eu/davidea/gradle/GrabVerTest.groovy +++ b/src/test/groovy/eu/davidea/gradle/GrabVerTest.groovy @@ -1,5 +1,6 @@ package eu.davidea.gradle +import nu.studer.java.util.OrderedProperties import org.gradle.api.Project import org.gradle.testfixtures.ProjectBuilder import org.junit.Before @@ -128,7 +129,7 @@ class GrabVerTest { private static void simulateProperties(int major, int minor, int patch, int build, int code) { // Load properties file File versionFile = getFile('version.properties') - Properties versionProps = new Properties() + OrderedProperties versionProps = new OrderedProperties() FileInputStream fis = new FileInputStream(versionFile) versionProps.load(fis) fis.close()