Skip to content

Commit 8e0365b

Browse files
xgfd3sync2gitee
and
sync2gitee
authored
[Android]Add gitee shell to use china repos in gitee project. (#368)
* [Android]Add gitee shell to use china repos in gitee project. * [Android][Audio]Update setting repos. --------- Co-authored-by: sync2gitee <sync2gitee@example.com>
1 parent c3bb865 commit 8e0365b

File tree

6 files changed

+27
-16
lines changed

6 files changed

+27
-16
lines changed

.github/workflows/gitee-sync-shell.sh

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
git config --global user.email "sync2gitee@example.com"
3+
git config --global user.name "sync2gitee"
4+
5+
pwd
6+
git remote -v
7+
8+
# change android maven to china repos
9+
sed -ie "s#google()#maven { url \"https\://maven.aliyun.com/repository/public\" }\n google()#g" Android/APIExample/settings.gradle
10+
sed -ie "s#https://services.gradle.org/distributions#https://mirrors.cloud.tencent.com/gradle#g" Android/APIExample/gradle/wrapper/gradle-wrapper.properties
11+
sed -ie "s#google()#maven { url \"https\://maven.aliyun.com/repository/public\" }\n google()#g" Android/APIExample-Audio/settings.gradle
12+
sed -ie "s#https://services.gradle.org/distributions#https://mirrors.cloud.tencent.com/gradle#g" Android/APIExample-Audio/gradle/wrapper/gradle-wrapper.properties
13+
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
14+
git commit -m '[Android] gitee sync >> use china repos.'
15+
16+
git branch
17+
git status
18+
git push gitee
19+
20+

.github/workflows/gitee-sync.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
if: github.actor != 'dependabot[bot]'
1515
steps:
1616
- name: Gitee sync repo
17-
uses: Yikun/hub-mirror-action@v1.3
17+
uses: xgfd3/hub-mirror-action@v1.0
1818
with:
1919
src: github/AgoraIO
2020
dst: gitee/agoraio-community
@@ -25,3 +25,4 @@ jobs:
2525
dst_token: ${{ secrets.GITEE_PRIVATE_TOKEN }}
2626
force_update: true
2727
account_type: org
28+
shell_path: ./.github/workflows/gitee-sync-shell.sh

Android/APIExample-Audio/gradle/wrapper/gradle-wrapper.properties

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
#distributionUrl=https://services.gradle.org/distributions/gradle-7.3.3-bin.zip
7-
distributionUrl=https://mirrors.cloud.tencent.com/gradle/gradle-7.3.3-bin.zip
6+
distributionUrl=https://services.gradle.org/distributions/gradle-7.3.3-bin.zip

Android/APIExample-Audio/settings.gradle

+3-8
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,17 @@
11
pluginManagement {
22
repositories {
3-
mavenCentral()
4-
maven { url "https://maven.aliyun.com/repository/jcenter" }
5-
maven { url "https://maven.aliyun.com/repository/public" }
63
google()
4+
mavenCentral()
75
gradlePluginPortal()
86
}
97
}
108
dependencyResolutionManagement {
119
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
1210
repositories {
13-
mavenCentral()
14-
maven { url "https://maven.aliyun.com/repository/google" }
15-
maven { url "https://maven.aliyun.com/repository/public" }
16-
maven { url "https://maven.aliyun.com/repository/jcenter" }
17-
maven { url "https://jitpack.io" }
1811
google()
1912
mavenCentral()
13+
maven { url "https://jitpack.io" }
14+
maven { url "https://maven.aliyun.com/repository/public" }
2015
}
2116
}
2217
rootProject.name='APIExample-Audio'

Android/APIExample/gradle/wrapper/gradle-wrapper.properties

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
#distributionUrl=https://services.gradle.org/distributions/gradle-7.3.3-bin.zip
7-
distributionUrl=https://mirrors.cloud.tencent.com/gradle/gradle-7.3.3-bin.zip
6+
distributionUrl=https://services.gradle.org/distributions/gradle-7.3.3-bin.zip

Android/APIExample/settings.gradle

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
pluginManagement {
22
repositories {
3-
maven { url "https://maven.aliyun.com/repository/public" }
43
google()
54
mavenCentral()
65
gradlePluginPortal()
@@ -9,10 +8,8 @@ pluginManagement {
98
dependencyResolutionManagement {
109
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
1110
repositories {
12-
maven { url "https://maven.aliyun.com/repository/public" }
1311
google()
1412
mavenCentral()
15-
maven { url "https://maven.aliyun.com/repository/public" }
1613
maven { url "https://jitpack.io" }
1714
maven {
1815
url 'http://maven.faceunity.com/repository/maven-public/'

0 commit comments

Comments
 (0)