diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index e3a96c4..98c076e 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -159,32 +159,17 @@ jobs: - name: Generate Android native project run: npx expo prebuild --platform android - - name: Configure Gradle with China mirrors and signing + - name: Configure Gradle with signing run: | cd android - # Switch Gradle distribution to Tencent mirror - PROPS="gradle/wrapper/gradle-wrapper.properties" - if [ -f "$PROPS" ]; then - sed -i 's|distributionUrl=https\\://services.gradle.org/distributions/|distributionUrl=https\\://mirrors.cloud.tencent.com/gradle/|' "$PROPS" - echo "Updated gradle-wrapper.properties:" - cat "$PROPS" - else - echo "gradle-wrapper.properties not found" - exit 1 - fi - # Decode Android signing keystore echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 -d > app/withyou-release-key.keystore - # Update settings.gradle with China Maven mirrors + # Update settings.gradle cat > settings.gradle << 'SETTINGS_EOF' pluginManagement { repositories { - maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } - maven { url 'https://maven.aliyun.com/repository/google' } - maven { url 'https://maven.aliyun.com/repository/public' } - maven { url 'https://maven.aliyun.com/repository/central' } maven { url 'https://developer.huawei.com/repo/' } google() mavenCentral() @@ -216,9 +201,6 @@ jobs: dependencyResolutionManagement { repositories { - maven { url 'https://maven.aliyun.com/repository/google' } - maven { url 'https://maven.aliyun.com/repository/public' } - maven { url 'https://maven.aliyun.com/repository/central' } maven { url 'https://developer.huawei.com/repo/' } google() mavenCentral() @@ -248,16 +230,12 @@ jobs: includeBuild(expoAutolinking.reactNativeGradlePlugin) SETTINGS_EOF - # Update build.gradle with China Maven mirrors + # Update build.gradle cat > build.gradle << 'BUILD_EOF' // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { - maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } - maven { url 'https://maven.aliyun.com/repository/google' } - maven { url 'https://maven.aliyun.com/repository/public' } - maven { url 'https://maven.aliyun.com/repository/central' } maven { url 'https://developer.huawei.com/repo/' } google() mavenCentral() @@ -275,9 +253,6 @@ jobs: allprojects { repositories { - maven { url 'https://maven.aliyun.com/repository/google' } - maven { url 'https://maven.aliyun.com/repository/public' } - maven { url 'https://maven.aliyun.com/repository/central' } maven { url 'https://developer.huawei.com/repo/' } google() mavenCentral()