From 9af6bf827daf55ef6cfdda8a2d7c87c78f0d7dab Mon Sep 17 00:00:00 2001 From: sync2gitee Date: Mon, 25 Dec 2023 12:02:16 +0800 Subject: [PATCH 1/2] [Android]Add gitee shell to use china repos in gitee project. --- .github/workflows/gitee-sync-shell.sh | 20 +++++++++++++++++++ .github/workflows/gitee-sync.yml | 3 ++- .../gradle/wrapper/gradle-wrapper.properties | 3 +-- Android/APIExample-Audio/settings.gradle | 10 ++-------- .../gradle/wrapper/gradle-wrapper.properties | 3 +-- Android/APIExample/settings.gradle | 3 --- 6 files changed, 26 insertions(+), 16 deletions(-) create mode 100755 .github/workflows/gitee-sync-shell.sh 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..6bb53f8fc 100644 --- a/Android/APIExample-Audio/settings.gradle +++ b/Android/APIExample-Audio/settings.gradle @@ -1,22 +1,16 @@ 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" } } } 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/' From 4a0e395a6460b17057f0b437f17a11293339017a Mon Sep 17 00:00:00 2001 From: sync2gitee Date: Mon, 25 Dec 2023 14:01:25 +0800 Subject: [PATCH 2/2] [Android][Audio]Update setting repos. --- Android/APIExample-Audio/settings.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/Android/APIExample-Audio/settings.gradle b/Android/APIExample-Audio/settings.gradle index 6bb53f8fc..7aa1c9aba 100644 --- a/Android/APIExample-Audio/settings.gradle +++ b/Android/APIExample-Audio/settings.gradle @@ -11,6 +11,7 @@ dependencyResolutionManagement { google() mavenCentral() maven { url "https://jitpack.io" } + maven { url "https://maven.aliyun.com/repository/public" } } } rootProject.name='APIExample-Audio'