From f2a1640c01cf1b47ee24e2d67107e0de68f8061b Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Fri, 31 Jan 2025 10:18:49 +0200 Subject: [PATCH] ci: Fix Crowdin pull --- .github/workflows/push_strings.yml | 2 ++ crowdin.yml | 2 +- patches/build.gradle.kts | 7 +++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/push_strings.yml b/.github/workflows/push_strings.yml index 2a52ac2cc..f7e9e2902 100644 --- a/.github/workflows/push_strings.yml +++ b/.github/workflows/push_strings.yml @@ -19,6 +19,8 @@ jobs: fetch-depth: 0 - name: Preprocess strings + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: ./gradlew clean preprocessCrowdinStrings - name: Push strings diff --git a/crowdin.yml b/crowdin.yml index 56c6308fa..148f321cd 100644 --- a/crowdin.yml +++ b/crowdin.yml @@ -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 diff --git a/patches/build.gradle.kts b/patches/build.gradle.kts index 27f98b740..7f3014e7f 100644 --- a/patches/build.gradle.kts +++ b/patches/build.gradle.kts @@ -25,14 +25,17 @@ tasks { register("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" ) } }