Skip to content

Commit

Permalink
[Android]Add gitee shell to use china repos in gitee project. (#368)
Browse files Browse the repository at this point in the history
* [Android]Add gitee shell to use china repos in gitee project.

* [Android][Audio]Update setting repos.

---------

Co-authored-by: sync2gitee <[email protected]>
  • Loading branch information
xgfd3 and sync2gitee authored Dec 26, 2023
1 parent c3bb865 commit 8e0365b
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 16 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/gitee-sync-shell.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
git config --global user.email "[email protected]"
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


3 changes: 2 additions & 1 deletion .github/workflows/gitee-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 3 additions & 8 deletions Android/APIExample-Audio/settings.gradle
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
3 changes: 1 addition & 2 deletions Android/APIExample/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 0 additions & 3 deletions Android/APIExample/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
pluginManagement {
repositories {
maven { url "https://maven.aliyun.com/repository/public" }
google()
mavenCentral()
gradlePluginPortal()
Expand All @@ -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/'
Expand Down

0 comments on commit 8e0365b

Please sign in to comment.