Remove previousVersion from 'jdiff' Gradle task
This commit is contained in:
parent
22e9e0bf03
commit
c5c464c885
|
@ -1,2 +1 @@
|
||||||
previousVersion=3.2.0.RC2
|
|
||||||
version=3.2.0.BUILD-SNAPSHOT
|
version=3.2.0.BUILD-SNAPSHOT
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
* Generate a JDiff report between the current version and an older version.
|
* Generate a JDiff report between the current version and an older version.
|
||||||
*
|
*
|
||||||
* Usage:
|
* Usage:
|
||||||
* gradle jdiff [-D OLD_VERSION=3.1.3.RELEASE] -D OLD_VERSION_ROOT=/path/to/3.1.3.RELEASE
|
* gradle jdiff -D OLD_VERSION=3.1.3.RELEASE -D OLD_VERSION_ROOT=/path/to/3.1.3.RELEASE
|
||||||
*
|
*
|
||||||
* View generated report at:
|
* View generated report at:
|
||||||
* build/reports/jdiff/changes.html
|
* build/reports/jdiff/changes.html
|
||||||
*
|
*
|
||||||
* @param OLD_VERSION optional, defaulting to value of `previousVersion` in gradle.properties
|
* @param OLD_VERSION required
|
||||||
* @param OLD_VERSION_ROOT required, typically pointing to a separate git clone dir
|
* @param OLD_VERSION_ROOT required, typically pointing to a separate git clone dir
|
||||||
*/
|
*/
|
||||||
task jdiff {
|
task jdiff {
|
||||||
|
@ -21,17 +21,18 @@ task jdiff {
|
||||||
classname: "jdiff.JDiffAntTask",
|
classname: "jdiff.JDiffAntTask",
|
||||||
classpath: "${jdiffHome}/antjdiff.jar")
|
classpath: "${jdiffHome}/antjdiff.jar")
|
||||||
|
|
||||||
def previousVersion = rootProject.previousVersion
|
|
||||||
|
|
||||||
def currentVersion = rootProject.version
|
def currentVersion = rootProject.version
|
||||||
def currentVersionRoot = rootProject.rootDir
|
def currentVersionRoot = rootProject.rootDir
|
||||||
|
|
||||||
def oldVersion = System.getProperty("OLD_VERSION") ?: previousVersion
|
def oldVersion = System.getProperty("OLD_VERSION")
|
||||||
def oldVersionRoot = System.getProperty("OLD_VERSION_ROOT")
|
def oldVersionRoot = System.getProperty("OLD_VERSION_ROOT")
|
||||||
|
|
||||||
def outputDir = "${rootProject.buildDir}/reports/jdiff/${oldVersion}_to_${currentVersion}"
|
def outputDir = "${rootProject.buildDir}/reports/jdiff/${oldVersion}_to_${currentVersion}"
|
||||||
|
|
||||||
doLast {
|
doLast {
|
||||||
|
if (oldVersion == null)
|
||||||
|
throw new IllegalArgumentException(
|
||||||
|
"Set OLD_VERSION property to indicate older of the two versions being compared")
|
||||||
if (oldVersionRoot == null)
|
if (oldVersionRoot == null)
|
||||||
throw new IllegalArgumentException(
|
throw new IllegalArgumentException(
|
||||||
"Set OLD_VERSION_ROOT property to indicate the root directory for ${oldVersion}")
|
"Set OLD_VERSION_ROOT property to indicate the root directory for ${oldVersion}")
|
||||||
|
|
Loading…
Reference in New Issue