Compare commits
6 Commits
v1.46.19(5
...
v1.46.20(5
| Author | SHA1 | Date | |
|---|---|---|---|
| 6338c1dfa6 | |||
| 657d85be86 | |||
| 97c907c992 | |||
| caed709b64 | |||
| 13800eecab | |||
| c4357f662c |
@@ -10,8 +10,8 @@ apply plugin: 'com.google.gms.google-services'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
def appVersionCode = 507
|
def appVersionCode = 508
|
||||||
def appVersionName = '1.46.19'
|
def appVersionName = '1.46.20'
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
@@ -57,7 +57,7 @@ android {
|
|||||||
}
|
}
|
||||||
release {
|
release {
|
||||||
// minifyEnabled true // Abilita la minimizzazione del codice
|
// minifyEnabled true // Abilita la minimizzazione del codice
|
||||||
shrinkResources true // Rimuove risorse non utilizzate
|
// shrinkResources true // Rimuove risorse non utilizzate
|
||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
signingConfig signingConfigs.release
|
signingConfig signingConfigs.release
|
||||||
}
|
}
|
||||||
@@ -78,12 +78,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
build {
|
|
||||||
doLast {
|
|
||||||
delete "$projectDir/build/outputs/apk/release/version.txt"
|
|
||||||
file("$projectDir/build/outputs/apk/release/version.txt").text = appVersionCode + '\n' + appVersionName + '\n' + 'forced=true'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gradle.projectsEvaluated {
|
gradle.projectsEvaluated {
|
||||||
tasks.withType(JavaCompile.class).tap {
|
tasks.withType(JavaCompile.class).tap {
|
||||||
@@ -111,9 +106,8 @@ dependencies {
|
|||||||
// exclude group: 'com.android.support', module: 'support-annotations'
|
// exclude group: 'com.android.support', module: 'support-annotations'
|
||||||
// })
|
// })
|
||||||
// implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
// implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||||
implementation 'com.github.lupaulus:logger:2.3.2'
|
|
||||||
|
|
||||||
//Firebase
|
implementation 'com.github.lupaulus:logger:2.3.2'
|
||||||
|
|
||||||
// Import the Firebase BoM
|
// Import the Firebase BoM
|
||||||
implementation platform('com.google.firebase:firebase-bom:33.14.0')
|
implementation platform('com.google.firebase:firebase-bom:33.14.0')
|
||||||
@@ -217,7 +211,33 @@ tasks.register('addBetaSuffix') {
|
|||||||
"output.outputFileName = \"${filename.replace('.apk', '-beta.apk')}\""
|
"output.outputFileName = \"${filename.replace('.apk', '-beta.apk')}\""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Modifica direttamente la riga che crea 'version.txt' in 'version-beta.txt'
|
||||||
|
content = content.replace(
|
||||||
|
"def versionFile = new File(outputDir, \"version.txt\")",
|
||||||
|
"def versionFile = new File(outputDir, \"version-beta.txt\")"
|
||||||
|
)
|
||||||
|
|
||||||
// Sovrascrivi il file
|
// Sovrascrivi il file
|
||||||
gradleFile.write(content)
|
gradleFile.write(content)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.register('createVersionFile') {
|
||||||
|
doLast {
|
||||||
|
def outputDir = file("${projectDir}/build/outputs/apk/release")
|
||||||
|
def versionFile = new File(outputDir, "version.txt")
|
||||||
|
|
||||||
|
// Cancella il file se esiste
|
||||||
|
if (versionFile.exists()) {
|
||||||
|
versionFile.delete()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Crea il file con i contenuti desiderati
|
||||||
|
versionFile.write("${android.defaultConfig.versionCode}\n${android.defaultConfig.versionName}\nforced=true")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
afterEvaluate {
|
||||||
|
tasks.assembleRelease.finalizedBy createVersionFile
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user