GeezerVison is showing github.com — Verify before we can't take it back, use preferredVersion variable · enderscode/RxJava@28c6989
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: gradle/buildscript.gradle +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -6,6 +6,6 @@ repositories { |
6 | 6 | dependencies { |
7 | 7 | classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.6.1' |
8 | 8 | classpath 'com.mapvine:gradle-cobertura-plugin:0.1' |
9 | | - classpath 'gradle-release:gradle-release:1.1.4' |
| 9 | + classpath 'gradle-release:gradle-release:1.1.5' |
10 | 10 | classpath 'org.ajoberstar:gradle-git:0.5.0' |
11 | 11 | } |
Collapse file
Copy file name to clipboardExpand all lines: gradle/convention.gradle +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
1 | | -status = version.contains('SNAPSHOT')?'snapshot':status |
| 1 | +// GRADLE-2087 workaround, perform after java plugin |
| 2 | +status = project.hasProperty('preferredStatus')?project.preferredStatus:(version.contains('SNAPSHOT')?'snapshot':'release') |
2 | 3 |
|
3 | 4 | subprojects { project -> |
4 | 5 | apply plugin: 'java' // Plugin as major conventions |
|
Collapse file
Copy file name to clipboardExpand all lines: gradle/release.gradle +8-3Lines changed: 8 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -19,7 +19,11 @@ task forceCandidate { |
19 | 19 | onlyIf { gradle.taskGraph.hasTask(releaseCandidate) } |
20 | 20 | doFirst { project.status = 'candidate' } |
21 | 21 | } |
22 | | -release.dependsOn(forceCandidate) |
| 22 | +task forceRelease { |
| 23 | + onlyIf { !gradle.taskGraph.hasTask(releaseCandidate) } |
| 24 | + doFirst { project.status = 'release' } |
| 25 | +} |
| 26 | +release.dependsOn([forceCandidate, forceRelease]) |
23 | 27 |
|
24 | 28 | task uploadMavenCentral(dependsOn: subprojects.tasks.uploadMavenCentral) |
25 | 29 | task releaseSnapshot(dependsOn: [uploadArtifactory, uploadMavenCentral]) |
@@ -34,8 +38,9 @@ task verifyStatus << { |
34 | 38 | uploadArtifactory.dependsOn(verifyStatus) |
35 | 39 | uploadMavenCentral.dependsOn(verifyStatus) |
36 | 40 |
|
37 | | -// Ensure upload happens before taggging but after all pre-checks |
38 | | -createReleaseTag.dependsOn([uploadArtifactory, uploadMavenCentral]) |
| 41 | +// Ensure upload happens before taggging, hence upload failures will leave repo in a revertable state |
| 42 | +preTagCommit.dependsOn([uploadArtifactory, uploadMavenCentral]) |
| 43 | + |
39 | 44 |
|
40 | 45 | gradle.taskGraph.whenReady { taskGraph -> |
41 | 46 | def hasRelease = taskGraph.hasTask('commitNewVersion') |
|