Using gradle.properties file for declaring group and version
authorGustavo Martin Morcuende <gu.martinm@gmail.com>
Tue, 24 Jan 2017 11:31:23 +0000 (12:31 +0100)
committerGustavo Martin Morcuende <gu.martinm@gmail.com>
Tue, 24 Jan 2017 11:35:23 +0000 (12:35 +0100)
SpringJava/Gradle/build-BOM-1.0-SNAPSHOT.gradle
SpringJava/Gradle/build.gradle
SpringJava/Gradle/gradle.properties
SpringJava/Gradle/settings.gradle

index b121525..f08c4c9 100644 (file)
@@ -170,7 +170,7 @@ subprojects {
     jar {
         manifest {
             attributes('Implementation-Title': 'Spring JPA Persistence, gradle example',
-                'Implementation-Version': version,
+                'Implementation-Version': theVersion,
                 'Build-Time': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
                 'Built-By': System.getProperty('user.name'),
                 'Built-JDK': System.getProperty('java.version')
index 523055d..285ed70 100644 (file)
@@ -1,7 +1,8 @@
 allprojects {
 
-    group='de.spring.jpa'
-    version='1.0-SNAPSHOT'
+
+    group = theGroup
+    version = theVersion
 
 
     // You could use your gradle 'BOM' file in this way:
index 9b2d48f..741ee99 100644 (file)
@@ -1,2 +1,3 @@
-group='de.spring.jpa'
-version='1.0-SNAPSHOT'
+theGroup=de.spring.jpa
+theName=spring-jpa
+theVersion=1.0-SNAPSHOT
index 3857904..55a08d3 100644 (file)
@@ -1,4 +1,4 @@
-rootProject.name='spring-jpa'
+rootProject.name = theName
 
 include ':spring-jpa-persistence'
 include ':spring-jpa-services'