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 {
1313 minSdkVersion 24
1414 targetSdkVersion 34
1515
16- // versionCode getGitCommitCount()
17- // versionName getTag()
16+ versionCode getGitCommitCount()
17+ versionName getTag()
1818 buildConfigField " String" , ' GIT_REPOSITORY' , " \" " + getGitOriginRemote() + " \" "
19- buildConfigField " String" , ' VERSION' , " \" " + versionName + " \" "
19+ buildConfigField " String" , ' VERSION' , " \" " + getTag() + " \" "
2020 }
2121
2222 buildTypes {
@@ -67,18 +67,8 @@ dependencies {
6767}
6868
6969static 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()
8272}
8373
8474static def getGitCommitCount () {
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ class SystemInfoFragment : PreferenceFragmentCompat() {
1616 addPreferencesFromResource(R .xml.prefs)
1717 // TODO after next release you can use info from library
1818 // 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
2020 findPreference<Preference >(PREFERENCE_ + " APPVERSION" )?.title =
2121 " ${findPreference<Preference >(PREFERENCE_ + " APPVERSION" )?.title} [${BuildConfig .FLAVOR } ]"
2222 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