Skip to content

Commit d6f8c8a

Browse files
author
zhangwei
committed
build(android): migrate RTC dependencies to official Maven repositories
1 parent 59235ae commit d6f8c8a

7 files changed

Lines changed: 46 additions & 10 deletions

File tree

‎Android/APIExample-Audio/cloud_build.sh‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ else
3333
fi
3434
fi
3535

36-
#change android maven to china repos
37-
sed -ie "s#google()#maven { url \"https\://maven.aliyun.com/repository/public\" }\n google()#g" settings.gradle
36+
# Maven repositories are configured in settings; mirror only the Gradle distribution.
3837
sed -ie "s#https://services.gradle.org/distributions#https://mirrors.cloud.tencent.com/gradle#g" gradle/wrapper/gradle-wrapper.properties
3938

4039
set_local_property() {

‎Android/APIExample-Audio/settings.gradle‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ pluginManagement {
1414
dependencyResolutionManagement {
1515
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
1616
repositories {
17+
// Resolve RTC SDK modules and their infrastructure dependencies from the official source.
18+
exclusiveContent {
19+
forRepository {
20+
maven { url = 'https://download.agora.io/maven/' }
21+
}
22+
filter {
23+
includeGroup("io.agora.rtc")
24+
includeGroup("io.agora.infra")
25+
}
26+
}
1727
google()
1828
mavenCentral()
1929
}

‎Android/APIExample-Compose/cloud_build.sh‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ else
3333
fi
3434
fi
3535

36-
#change android maven to china repos
37-
sed -ie "s#google()#maven { url = uri(\"https://maven.aliyun.com/repository/public\") }\n google()#g" settings.gradle.kts
36+
# Maven repositories are configured in settings; mirror only the Gradle distribution.
3837
sed -ie "s#https://services.gradle.org/distributions#https://mirrors.cloud.tencent.com/gradle#g" gradle/wrapper/gradle-wrapper.properties
3938

4039
set_local_property() {

‎Android/APIExample-Compose/settings.gradle.kts‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ pluginManagement {
1414
dependencyResolutionManagement {
1515
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
1616
repositories {
17+
// Resolve RTC SDK modules and their infrastructure dependencies from the official source.
18+
exclusiveContent {
19+
forRepository {
20+
maven { url = uri("https://download.agora.io/maven/") }
21+
}
22+
filter {
23+
includeGroup("io.agora.rtc")
24+
includeGroup("io.agora.infra")
25+
}
26+
}
1727
google()
1828
mavenCentral()
1929
}

‎Android/APIExample/cloud_build.sh‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@ else
3030
fi
3131
fi
3232

33-
#change android maven to china repos
34-
#sed -ie "s#google()#maven { url \"https\://maven.aliyun.com/repository/public\" }\n google()#g" settings.gradle
35-
#sed -ie "s#https://services.gradle.org/distributions#https://mirrors.cloud.tencent.com/gradle#g"
36-
# gradle/wrapper/gradle-wrapper.properties
37-
3833
set_local_property() {
3934
key="$1"
4035
value="$2"

‎Android/APIExample/settings.gradle‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ pluginManagement {
1414
dependencyResolutionManagement {
1515
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
1616
repositories {
17+
// Resolve RTC SDK modules and their infrastructure dependencies from the official source.
18+
exclusiveContent {
19+
forRepository {
20+
maven { url = 'https://download.agora.io/maven/' }
21+
}
22+
filter {
23+
includeGroup("io.agora.rtc")
24+
includeGroup("io.agora.infra")
25+
}
26+
}
1727
google()
1828
mavenCentral()
1929
maven {
@@ -29,4 +39,4 @@ if (simpleFilter.toBoolean()) {
2939
}
3040
if (streamEncrypt.toBoolean()) {
3141
include ':agora-stream-encrypt'
32-
}
42+
}

‎docs/ai/project-matrix.md‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,19 @@ change contract; this document defines the stable project inventory and dependen
1515
| macOS AppKit | `macOS/` | `AgoraRtcEngine_macOS` in `Podfile` | `macOS/AGENTS.md` |
1616
| Windows MFC | `windows/APIExample/` | Local `../../sdk` or public `Agora_Native_SDK_for_Windows_*_FULL.zip` | `windows/AGENTS.md` |
1717

18+
## Android SDK source
19+
20+
All three Android projects resolve `io.agora.rtc` and `io.agora.infra` exclusively
21+
from [the official Agora Maven repository](https://download.agora.io/maven/) when a local
22+
`../../sdk` directory is absent. Repository routing is declared in each project's
23+
`settings.gradle` or `settings.gradle.kts`; use the fixed `rtc_sdk_version` from
24+
`gradle.properties`. Plugin and other third-party dependency repositories are separate.
25+
26+
The checked-in settings are included in source packages. Cloud build adapters do
27+
not inject an Aliyun Maven repository for RTC dependencies. Validate Maven resolution
28+
without a local SDK and with a fresh dependency cache; compiling with a bundled SDK does
29+
not validate the public repository.
30+
1831
## Scope Rules
1932

2033
- SDK version, dependency, credential plumbing, CI, and packaging changes require review of

0 commit comments

Comments
 (0)