Aggiornato build.gradle
Some checks failed
WMS - Android (New)/pipeline/head There was a failure building this commit
Some checks failed
WMS - Android (New)/pipeline/head There was a failure building this commit
This commit is contained in:
@@ -198,3 +198,23 @@ repositories {
|
||||
google()
|
||||
maven { url 'https://jitpack.io' }
|
||||
}
|
||||
|
||||
tasks.register('addBetaSuffix') {
|
||||
doLast {
|
||||
def gradleFile = file("build.gradle")
|
||||
def content = gradleFile.text
|
||||
|
||||
// Modifica appVersionName
|
||||
content = content.replaceAll(/appVersionName\s*=\s*'(.*?)'/) { fullMatch, version ->
|
||||
"appVersionName = '${version}-beta'"
|
||||
}
|
||||
|
||||
// Modifica outputFileName
|
||||
content = content.replaceAll(/output\.outputFileName\s*=\s*"(.*?)"/) { fullMatch, filename ->
|
||||
"output.outputFileName = \"${filename.replace('.apk', '-beta.apk')}\""
|
||||
}
|
||||
|
||||
// Sovrascrivi il file
|
||||
gradleFile.write(content)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user