Skip to content

Commit a0be6ad

Browse files
committed
Extract Project Version
Previously the project version in the build was explicitly specified within the build script itself. This way of specifying the project version makes the value non-overrideable from the command line. This change moves that value to the gradle.properties file where it becomes a "normal" property, overridable using the standard -P syntax.
1 parent 1844bac commit a0be6ad

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

build.gradle

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ plugins {
2626
id 'io.morethan.jmhreport' version '0.7.0' apply false
2727
}
2828

29-
allprojects {
30-
version = hasProperty('version') ? property('version') : '0.11.0.BUILD-SNAPSHOT'
31-
}
32-
3329
subprojects {
3430
apply plugin: 'io.spring.dependency-management'
3531

gradle.properties

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
#
6+
# http://www.apache.org/licenses/LICENSE-2.0
7+
#
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
#
14+
version=0.11.0.BUILD-SNAPSHOT

0 commit comments

Comments
 (0)