mirror of
https://github.com/SagerNet/sing-box-for-android.git
synced 2025-04-02 19:37:39 +03:00
Make F-Droid happy
This commit is contained in:
parent
f8ebfaabe2
commit
956867d286
2 changed files with 21 additions and 3 deletions
|
@ -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")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -166,4 +166,19 @@ def getProps(String propName) {
|
|||
} else {
|
||||
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
|
Loading…
Add table
Add a link
Reference in a new issue