android {
// ...
defaultConfig {
minSdkVersion 22
targetSdkVersion 33
multiDexEnabled true
applicationId 'com.xxx.xxxx'
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a'
}
versionCode 119
versionName '1.1.9'
setProperty("archivesBaseName","${getAppName()}_${defaultConfig.versionName}_${defaultConfig.versionCode}_${releaseTime()}")
}
// ...
}
def releaseTime() {
return new Date().format("yyyy_MM_dd", TimeZone.getTimeZone("UTC"))
}
def getUnityProjectPath() {
return "file:///F:/WorkProject2/juicedrinkdiy-MainIOS".replace("\\", "/");
}
def getAppName() {
def stringsFile = android.sourceSets.main.res.sourceFiles.find { it.name.equals 'strings.xml' }
String s = new XmlParser().parse(stringsFile).string.find { it.@name.equals 'app_name' }.text();
return s.replaceAll("\"", "").replace(" ","").replace(":","");
}