mirror of https://github.com/apache/lucene.git
LUCENE-9474: Make the version number configurable from outside. This mainly allows Jenkins to set a different suffix than "SNAPSHOT"
This commit is contained in:
parent
f37f0bf3a7
commit
ee6cf4c418
19
build.gradle
19
build.gradle
|
@ -26,10 +26,24 @@ plugins {
|
||||||
id "de.undercouch.download" version "4.0.2" apply false
|
id "de.undercouch.download" version "4.0.2" apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
// Project version.
|
apply from: file('gradle/defaults.gradle')
|
||||||
version = "9.0.0-SNAPSHOT"
|
|
||||||
|
|
||||||
// General metadata.
|
// General metadata.
|
||||||
|
|
||||||
|
// Calculate project version:
|
||||||
|
version = {
|
||||||
|
// Release manager: update base version here after release:
|
||||||
|
String baseVersion = '9.0.0'
|
||||||
|
|
||||||
|
// On a release explicitly set release version in one go:
|
||||||
|
// -Dversion.release=x.y.z
|
||||||
|
|
||||||
|
// Jenkins can just set just a suffix, overriding SNAPSHOT, e.g. using build id:
|
||||||
|
// -Dversion.suffix=jenkins123
|
||||||
|
|
||||||
|
String versionSuffix = propertyOrDefault('version.suffix', 'SNAPSHOT')
|
||||||
|
return propertyOrDefault('version.release', "${baseVersion}-${versionSuffix}")
|
||||||
|
}()
|
||||||
description = 'Grandparent project for Apache Lucene Core and Apache Solr'
|
description = 'Grandparent project for Apache Lucene Core and Apache Solr'
|
||||||
|
|
||||||
// Propagate version and derived properties across projects.
|
// Propagate version and derived properties across projects.
|
||||||
|
@ -91,7 +105,6 @@ apply from: file('gradle/ant-compat/folder-layout.gradle')
|
||||||
|
|
||||||
// Set up defaults and configure aspects for certain modules or functionality
|
// Set up defaults and configure aspects for certain modules or functionality
|
||||||
// (java, tests)
|
// (java, tests)
|
||||||
apply from: file('gradle/defaults.gradle')
|
|
||||||
apply from: file('gradle/defaults-java.gradle')
|
apply from: file('gradle/defaults-java.gradle')
|
||||||
apply from: file('gradle/testing/defaults-tests.gradle')
|
apply from: file('gradle/testing/defaults-tests.gradle')
|
||||||
apply from: file('gradle/testing/randomization.gradle')
|
apply from: file('gradle/testing/randomization.gradle')
|
||||||
|
|
Loading…
Reference in New Issue