diff --git a/.github/workflows/gitee-sync-shell.sh b/.github/workflows/gitee-sync-shell.sh new file mode 100755 index 000000000..1a7f4f437 --- /dev/null +++ b/.github/workflows/gitee-sync-shell.sh @@ -0,0 +1,20 @@ +#!/bin/bash +git config --global user.email "sync2gitee@example.com" +git config --global user.name "sync2gitee" + +pwd +git remote -v + +# change android maven to china repos +sed -ie "s#google()#maven { url \"https\://maven.aliyun.com/repository/public\" }\n google()#g" Android/APIExample/settings.gradle +sed -ie "s#https://services.gradle.org/distributions#https://mirrors.cloud.tencent.com/gradle#g" Android/APIExample/gradle/wrapper/gradle-wrapper.properties +sed -ie "s#google()#maven { url \"https\://maven.aliyun.com/repository/public\" }\n google()#g" Android/APIExample-Audio/settings.gradle +sed -ie "s#https://services.gradle.org/distributions#https://mirrors.cloud.tencent.com/gradle#g" Android/APIExample-Audio/gradle/wrapper/gradle-wrapper.properties +git add Android/APIExample/settings.gradle Android/APIExample/gradle/wrapper/gradle-wrapper.properties Android/APIExample-Audio/settings.gradle Android/APIExample-Audio/gradle/wrapper/gradle-wrapper.properties +git commit -m '[Android] gitee sync >> use china repos.' + +git branch +git status +git push gitee + + diff --git a/.github/workflows/gitee-sync.yml b/.github/workflows/gitee-sync.yml index 60d6866bb..5f85f0b99 100644 --- a/.github/workflows/gitee-sync.yml +++ b/.github/workflows/gitee-sync.yml @@ -14,7 +14,7 @@ jobs: if: github.actor != 'dependabot[bot]' steps: - name: Gitee sync repo - uses: Yikun/hub-mirror-action@v1.3 + uses: xgfd3/hub-mirror-action@v1.0 with: src: github/AgoraIO dst: gitee/agoraio-community @@ -25,3 +25,4 @@ jobs: dst_token: ${{ secrets.GITEE_PRIVATE_TOKEN }} force_update: true account_type: org + shell_path: ./.github/workflows/gitee-sync-shell.sh diff --git a/Android/APIExample-Audio/gradle/wrapper/gradle-wrapper.properties b/Android/APIExample-Audio/gradle/wrapper/gradle-wrapper.properties index 89d7ee3b3..061df5425 100644 --- a/Android/APIExample-Audio/gradle/wrapper/gradle-wrapper.properties +++ b/Android/APIExample-Audio/gradle/wrapper/gradle-wrapper.properties @@ -3,5 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -#distributionUrl=https://services.gradle.org/distributions/gradle-7.3.3-bin.zip -distributionUrl=https://mirrors.cloud.tencent.com/gradle/gradle-7.3.3-bin.zip +distributionUrl=https://services.gradle.org/distributions/gradle-7.3.3-bin.zip diff --git a/Android/APIExample-Audio/settings.gradle b/Android/APIExample-Audio/settings.gradle index e07973d13..7aa1c9aba 100644 --- a/Android/APIExample-Audio/settings.gradle +++ b/Android/APIExample-Audio/settings.gradle @@ -1,22 +1,17 @@ pluginManagement { repositories { - mavenCentral() - maven { url "https://maven.aliyun.com/repository/jcenter" } - maven { url "https://maven.aliyun.com/repository/public" } google() + mavenCentral() gradlePluginPortal() } } dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { - mavenCentral() - maven { url "https://maven.aliyun.com/repository/google" } - maven { url "https://maven.aliyun.com/repository/public" } - maven { url "https://maven.aliyun.com/repository/jcenter" } - maven { url "https://jitpack.io" } google() mavenCentral() + maven { url "https://jitpack.io" } + maven { url "https://maven.aliyun.com/repository/public" } } } rootProject.name='APIExample-Audio' diff --git a/Android/APIExample/gradle/wrapper/gradle-wrapper.properties b/Android/APIExample/gradle/wrapper/gradle-wrapper.properties index 89d7ee3b3..061df5425 100644 --- a/Android/APIExample/gradle/wrapper/gradle-wrapper.properties +++ b/Android/APIExample/gradle/wrapper/gradle-wrapper.properties @@ -3,5 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -#distributionUrl=https://services.gradle.org/distributions/gradle-7.3.3-bin.zip -distributionUrl=https://mirrors.cloud.tencent.com/gradle/gradle-7.3.3-bin.zip +distributionUrl=https://services.gradle.org/distributions/gradle-7.3.3-bin.zip diff --git a/Android/APIExample/settings.gradle b/Android/APIExample/settings.gradle index de541fdd5..f96eab9ce 100644 --- a/Android/APIExample/settings.gradle +++ b/Android/APIExample/settings.gradle @@ -1,6 +1,5 @@ pluginManagement { repositories { - maven { url "https://maven.aliyun.com/repository/public" } google() mavenCentral() gradlePluginPortal() @@ -9,10 +8,8 @@ pluginManagement { dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { - maven { url "https://maven.aliyun.com/repository/public" } google() mavenCentral() - maven { url "https://maven.aliyun.com/repository/public" } maven { url "https://jitpack.io" } maven { url 'http://maven.faceunity.com/repository/maven-public/'