Aggiornato build.gradle
Some checks failed
WMS - Android (New)/pipeline/head There was a failure building this commit

This commit is contained in:
2025-05-28 12:24:24 +02:00
parent cff971bef8
commit a5479595c7
2 changed files with 21 additions and 21 deletions

View File

@@ -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)
}
}