ci: Fix Crowdin pull

This commit is contained in:
LisoUseInAIKyrios 2025-01-31 10:18:49 +02:00
parent 5e1809cacf
commit f2a1640c01
3 changed files with 8 additions and 3 deletions

View File

@ -19,6 +19,8 @@ jobs:
fetch-depth: 0
- name: Preprocess strings
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew clean preprocessCrowdinStrings
- name: Push strings

View File

@ -3,6 +3,6 @@ api_token_env: "CROWDIN_PERSONAL_TOKEN"
preserve_hierarchy: false
files:
- source: patches/build/tmp/crowdin/strings.xml
- source: patches/src/main/resources/addresources/values/strings.xml
translation: patches/src/main/resources/addresources/values-%android_code%/strings.xml
skip_untranslated_strings: true

View File

@ -25,14 +25,17 @@ tasks {
register<JavaExec>("preprocessCrowdinStrings") {
description = "Preprocess strings for Crowdin push"
dependsOn(build)
dependsOn(compileKotlin)
classpath = sourceSets["main"].runtimeClasspath
mainClass.set("app.revanced.util.CrowdinPreprocessorKt")
args = listOf(
"src/main/resources/addresources/values/strings.xml",
"build/tmp/crowdin/strings.xml"
// Ideally this would use build/tmp/crowdin/strings.xml
// But using that does not work with Crowdin pull because
// it does not recognize the strings.xml file belongs to this project.
"src/main/resources/addresources/values/strings.xml"
)
}
}