File tree Expand file tree Collapse file tree 3 files changed +7
-18
lines changed
src/main/java/com/example/virosample Expand file tree Collapse file tree 3 files changed +7
-18
lines changed Original file line number Diff line number Diff line change @@ -13,10 +13,10 @@ android {
13
13
minSdkVersion 24
14
14
targetSdkVersion 34
15
15
16
- // versionCode getGitCommitCount()
17
- // versionName getTag()
16
+ versionCode getGitCommitCount()
17
+ versionName getTag()
18
18
buildConfigField " String" , ' GIT_REPOSITORY' , " \" " + getGitOriginRemote() + " \" "
19
- buildConfigField " String" , ' VERSION' , " \" " + versionName + " \" "
19
+ buildConfigField " String" , ' VERSION' , " \" " + getTag() + " \" "
20
20
}
21
21
22
22
buildTypes {
@@ -67,18 +67,8 @@ dependencies {
67
67
}
68
68
69
69
static def getTag () {
70
- def tagVersion = " $System . env . TAG_VERSION "
71
- if (tagVersion == " null" ) {
72
- println " No variable TAG_VERSION specified, I'm using 'git describe --abbrev=0'"
73
- def process = " git describe --abbrev=0" . execute()
74
- tagVersion = process. text. toString(). trim()
75
- if (tagVersion. equals(" " )) {
76
- println " abbrev failed, I'm using 'git --tags'"
77
- def processT = " git describe --tags" . execute()
78
- tagVersion = processT. text. toString(). trim()
79
- }
80
- }
81
- return tagVersion
70
+ def process = " git describe --tags --abbrev=0" . execute()
71
+ return process. text. toString(). trim()
82
72
}
83
73
84
74
static def getGitCommitCount () {
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ class SystemInfoFragment : PreferenceFragmentCompat() {
16
16
addPreferencesFromResource(R .xml.prefs)
17
17
// TODO after next release you can use info from library
18
18
// findPreference<Preference>(PREFERENCE_ + "APPVERSION")?.summary = com.viro.renderer.BuildConfig.VIRO_VERSION
19
- findPreference<Preference >(PREFERENCE_ + " APPVERSION" )?.summary = BuildConfig .VERSION_NAME
19
+ findPreference<Preference >(PREFERENCE_ + " APPVERSION" )?.summary = BuildConfig .VERSION
20
20
findPreference<Preference >(PREFERENCE_ + " APPVERSION" )?.title =
21
21
" ${findPreference<Preference >(PREFERENCE_ + " APPVERSION" )?.title} [${BuildConfig .FLAVOR } ]"
22
22
findPreference<Preference >(PREFERENCE_ + " BOARD" )?.summary = Build .BOARD
Original file line number Diff line number Diff line change 1
- <manifest xmlns : android =" http://schemas.android.com/apk/res/android"
2
- package =" com.viro.ar" />
1
+ <manifest xmlns : android =" http://schemas.android.com/apk/res/android" />
You canβt perform that action at this time.
0 commit comments