Skip to content
Snippets Groups Projects
Commit 2a0d10e0 authored by Nicholas Blair's avatar Nicholas Blair
Browse files

Merge branch 'publish' into 'master'

docs: correct documentation for buildscript block, add local confirmProjectVersionIncrementedTask

Small fix to correct the example provided in the README.

Also includes a way to invoke the confirmProjectVersionIncrementedTask, sharing the logic with the task in the release.

See merge request !1
parents 01dca8c4 03405ace
No related branches found
No related tags found
1 merge request!1docs: correct documentation for buildscript block, add local confirmProjectVersionIncrementedTask
......@@ -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'
}
}
```
......
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
}
#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
import edu.wisc.doit.gradle.CompareVersions
import org.ajoberstar.grgit.Grgit
def grgit = Grgit.open(dir: args[0])
CompareVersions.compare(grgit.describe(), args[1])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment