Skip to content

Commit 93280da

Browse files
Update android, javaSE & javaEE gradle setup to read version for one file (#1764)
* Move VERSION_NAME from gradle.properties to build.gradle * Fix VERSION_NAME value in build.gradle for Android
1 parent 0bda034 commit 93280da

6 files changed

Lines changed: 4 additions & 3 deletions

File tree

android/sdl_android/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ android {
4040
}
4141
}
4242

43+
ext { VERSION_NAME = "$project.android.defaultConfig.versionName" }
44+
4345
dependencies {
4446
api fileTree(dir: 'libs', include: ['*.jar'])
4547
//api 'com.livio.taskmaster:taskmaster:0.6.0'

android/sdl_android/gradle.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
GROUP=com.smartdevicelink
22
POM_ARTIFACT_ID=sdl_android
3-
VERSION_NAME=5.3.0
43

54
POM_NAME=sdl_android
65
POM_PACKAGING=aar

javaEE/javaEE/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ apply plugin: 'java-library'
22

33
group 'com.smartdevicelink'
44
version new File(projectDir.path, ('/../../VERSION')).text.trim()
5+
ext { VERSION_NAME = "$project.version" }
56

67
sourceCompatibility = 1.7
78

javaEE/javaEE/gradle.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
GROUP=com.smartdevicelink
22
POM_ARTIFACT_ID=sdl_java_ee
3-
VERSION_NAME=5.3.0
43

54
POM_NAME=sdl_java_ee
65
POM_PACKAGING=jar

javaSE/javaSE/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ apply plugin: 'java-library'
22

33
group 'com.smartdevicelink'
44
version new File(projectDir.path, ('/../../VERSION')).text.trim()
5+
ext { VERSION_NAME = "$project.version" }
56

67
sourceCompatibility = 1.7
78

javaSE/javaSE/gradle.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
GROUP=com.smartdevicelink
22
POM_ARTIFACT_ID=sdl_java_se
3-
VERSION_NAME=5.3.0
43

54
POM_NAME=sdl_java_se
65
POM_PACKAGING=jar

0 commit comments

Comments
 (0)