[android] Streamline Google Play metadata handling

Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
Konstantin Pastbin
2025-05-25 15:34:05 +07:00
committed by Konstantin Pastbin
parent 7df2188212
commit 44eca9ab5e
2 changed files with 5 additions and 38 deletions

View File

@@ -372,32 +372,6 @@ android.applicationVariants.all { variant ->
variant.resValue 'string', 'app_id', variant.applicationId
}
task prepareGoogleReleaseListing {
// Prepares Google Play metainfo from F-Droid metainfo.
final sourceFlavor = 'fdroid'
final targetFlavor = 'google'
doLast {
final sourceDir = new File("${projectDir}/src/$sourceFlavor/play/listings")
final targetDir = new File("${projectDir}/src/$targetFlavor/play/listings")
final sourceFiles = fileTree(dir: sourceDir,
include: '**/*.txt', exclude: "**/*-${targetFlavor}.txt")
sourceFiles.each { File sourceFile ->
final locale = sourceFile.parentFile.getName()
final targetLocaleDir = new File(targetDir, locale)
if (!targetLocaleDir.isDirectory())
targetLocaleDir.mkdirs()
final targetFile = new File(targetLocaleDir, sourceFile.getName())
// Override Google-specific values by using ${name}-google.txt files.
final overrideFile = new File(sourceFile.getPath().replace('.txt', "-${targetFlavor}.txt"))
targetFile.text = overrideFile.exists() ? overrideFile.text : sourceFile.text
}
copy {
from "${projectDir}/../../screenshots/android"
into targetDir
}
}
}
play {
enabled.set(false)
track.set('production')