Skip to content

Commit c5c464c

Browse files
committed
Remove previousVersion from 'jdiff' Gradle task
1 parent 22e9e0b commit c5c464c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

gradle.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
previousVersion=3.2.0.RC2
21
version=3.2.0.BUILD-SNAPSHOT

gradle/jdiff.gradle

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
* Generate a JDiff report between the current version and an older version.
33
*
44
* Usage:
5-
* gradle jdiff [-D OLD_VERSION=3.1.3.RELEASE] -D OLD_VERSION_ROOT=/path/to/3.1.3.RELEASE
5+
* gradle jdiff -D OLD_VERSION=3.1.3.RELEASE -D OLD_VERSION_ROOT=/path/to/3.1.3.RELEASE
66
*
77
* View generated report at:
88
* build/reports/jdiff/changes.html
99
*
10-
* @param OLD_VERSION optional, defaulting to value of `previousVersion` in gradle.properties
10+
* @param OLD_VERSION required
1111
* @param OLD_VERSION_ROOT required, typically pointing to a separate git clone dir
1212
*/
1313
task jdiff {
@@ -21,17 +21,18 @@ task jdiff {
2121
classname: "jdiff.JDiffAntTask",
2222
classpath: "${jdiffHome}/antjdiff.jar")
2323

24-
def previousVersion = rootProject.previousVersion
25-
2624
def currentVersion = rootProject.version
2725
def currentVersionRoot = rootProject.rootDir
2826

29-
def oldVersion = System.getProperty("OLD_VERSION") ?: previousVersion
27+
def oldVersion = System.getProperty("OLD_VERSION")
3028
def oldVersionRoot = System.getProperty("OLD_VERSION_ROOT")
3129

3230
def outputDir = "${rootProject.buildDir}/reports/jdiff/${oldVersion}_to_${currentVersion}"
3331

3432
doLast {
33+
if (oldVersion == null)
34+
throw new IllegalArgumentException(
35+
"Set OLD_VERSION property to indicate older of the two versions being compared")
3536
if (oldVersionRoot == null)
3637
throw new IllegalArgumentException(
3738
"Set OLD_VERSION_ROOT property to indicate the root directory for ${oldVersion}")

0 commit comments

Comments
 (0)