Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android]Add gitee shell to use china repos in gitee project. #368

Merged
merged 2 commits into from
Dec 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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