File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,8 +21,8 @@ android {
2121 applicationId " io.nekohasekai.sfa"
2222 minSdk 21
2323 targetSdk 34
24- versionCode getProps (" VERSION_CODE" ). toInteger()
25- versionName getProps (" VERSION_NAME" )
24+ versionCode getVersionProps (" VERSION_CODE" ). toInteger()
25+ versionName getVersionProps (" VERSION_NAME" )
2626 setProperty(" archivesBaseName" , " SFA-" + versionName)
2727 }
2828
@@ -79,7 +79,7 @@ android {
7979 variant. outputs. configureEach {
8080 outputFileName = (outputFileName as String ). replace(" -release" , " " )
8181 outputFileName = (outputFileName as String ). replace(" -play" , " " )
82- outputFileName = (outputFileName as String ). replace(" -other" , " " )
82+ outputFileName = (outputFileName as String ). replace(" -other" , " -foss " )
8383 }
8484 }
8585}
@@ -166,4 +166,19 @@ def getProps(String propName) {
166166 } else {
167167 return " "
168168 }
169+ }
170+
171+ def getVersionProps (String propName ) {
172+ def propsFile = rootProject. file(' version.properties' )
173+ if (propsFile. exists()) {
174+ def props = new Properties ()
175+ props. load(new FileInputStream (propsFile))
176+ String value = props[propName]
177+ if (value == null ) {
178+ return " "
179+ }
180+ return value
181+ } else {
182+ return " "
183+ }
169184}
Original file line number Diff line number Diff line change 1+ VERSION_CODE =260
2+ VERSION_NAME =1.8.6
3+ GO_VERSION =go1.22.0
You can’t perform that action at this time.
0 commit comments