Make F-Droid happy
This commit is contained in:
@@ -21,8 +21,8 @@ android {
|
||||
applicationId "io.nekohasekai.sfa"
|
||||
minSdk 21
|
||||
targetSdk 34
|
||||
versionCode getProps("VERSION_CODE").toInteger()
|
||||
versionName getProps("VERSION_NAME")
|
||||
versionCode getVersionProps("VERSION_CODE").toInteger()
|
||||
versionName getVersionProps("VERSION_NAME")
|
||||
setProperty("archivesBaseName", "SFA-" + versionName)
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ android {
|
||||
variant.outputs.configureEach {
|
||||
outputFileName = (outputFileName as String).replace("-release", "")
|
||||
outputFileName = (outputFileName as String).replace("-play", "")
|
||||
outputFileName = (outputFileName as String).replace("-other", "")
|
||||
outputFileName = (outputFileName as String).replace("-other", "-foss")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -167,3 +167,18 @@ def getProps(String propName) {
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
def getVersionProps(String propName) {
|
||||
def propsFile = rootProject.file('version.properties')
|
||||
if (propsFile.exists()) {
|
||||
def props = new Properties()
|
||||
props.load(new FileInputStream(propsFile))
|
||||
String value = props[propName]
|
||||
if (value == null) {
|
||||
return ""
|
||||
}
|
||||
return value
|
||||
} else {
|
||||
return ""
|
||||
}
|
||||
}
|
||||
3
version.properties
Normal file
3
version.properties
Normal file
@@ -0,0 +1,3 @@
|
||||
VERSION_CODE=260
|
||||
VERSION_NAME=1.8.6
|
||||
GO_VERSION=go1.22.0
|
||||
Reference in New Issue
Block a user