diff --git a/README.md b/README.md index c2a711e57336ea965a988fb677e098dfa5924e6c..da68e93187ecd82f5240db9fd5ade045a23584f4 100644 --- a/README.md +++ b/README.md @@ -9,12 +9,16 @@ To get the dependency, you will need a `buildscript` block at the top of your bu ``` buildscript { repositories { - repository(url: "https://code.doit.wisc.edu/maven/content/repositories/uw-releases") { - authentication(userName: codeDoitUsername, password: codeDoitPassword) + maven () { + url "https://code.doit.wisc.edu/maven/content/repositories/uw-releases" + credentials { + username codeDoitUsername + password codeDoitPassword + } } } dependencies { - classpath 'edu.wisc.doit.adi.gradle:continuous-publish-plugin:0.1.0-SNAPSHOT' + classpath 'edu.wisc.doit.gradle:continuous-publish-plugin:0.1.0' } } ``` diff --git a/build.gradle b/build.gradle index 731b4b0da4cea99894fb068117cd0afc04756f50..0314851b4dc47ccd3036d2db0156af0925fe8779 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ group 'edu.wisc.doit.gradle' -version '0.1.0' +version '0.1.1' apply plugin: 'groovy' apply plugin: 'idea' @@ -53,3 +53,18 @@ uploadArchives { task wrapper(type: Wrapper) { gradleVersion = '3.0' } + +/** + * Gradle doesn't have a way for us to apply the local plugin, we'd have to depend on a prior release. + * Add a local version of the confirmProjectVersionIncremented task that calls the same logic + * as the released task. + * + * See src/main/groovy/localTaskScript.groovy + */ +task confirmProjectVersionIncremented (dependsOn: 'classes', type: JavaExec) { + main = 'localTaskScript' + classpath = sourceSets.main.runtimeClasspath + args project.projectDir.absolutePath + args project.version +} + diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 2f9830e46e4daab0f07c0584c7b9e54fd5ae8957..789fe156a938e04b060ed6ef344f03a897450f66 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Fri Aug 26 09:10:13 CDT 2016 +#Tue Aug 30 12:39:17 CDT 2016 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-3.0-all.zip diff --git a/src/main/groovy/localTaskScript.groovy b/src/main/groovy/localTaskScript.groovy new file mode 100644 index 0000000000000000000000000000000000000000..819ea66eed42b0357e528c9b5ee8f8ac7a86b323 --- /dev/null +++ b/src/main/groovy/localTaskScript.groovy @@ -0,0 +1,7 @@ +import edu.wisc.doit.gradle.CompareVersions +import org.ajoberstar.grgit.Grgit + +def grgit = Grgit.open(dir: args[0]) +CompareVersions.compare(grgit.describe(), args[1]) + +