docs: add Android Gradle Maven CDN guidance - #1109
Conversation
4ac5c31 to
56c9f1d
Compare
56c9f1d to
09aabea
Compare
Vercel PreviewPreview URL: https://docs-portal-m3en9anrb-agora-gdxe.vercel.app |
| 1. To integrate the RTC SDK into your Android project, add the following to the `dependencies` block in your project module `build.gradle` file: | ||
|
|
||
| - Groovy `build.gradle` | ||
|
|
||
| ```groovy | ||
| // Choose either the Full SDK or the Lite SDK based on your business needs. | ||
| implementation 'io.agora.rtc:full-sdk:x.y.z' | ||
| // Or integrate the Lite SDK | ||
| implementation 'io.agora.rtc:lite-sdk:x.y.z' | ||
| ``` | ||
|
|
||
| - Kotlin `build.gradle.kts` | ||
|
|
||
| ```kotlin | ||
| // Choose either the Full SDK or the Lite SDK based on your business needs. | ||
| implementation("io.agora.rtc:full-sdk:x.y.z") | ||
| // Or integrate the Lite SDK | ||
| implementation("io.agora.rtc:lite-sdk:x.y.z") | ||
| ``` |
There was a problem hiding this comment.
Putting the Full and Lite lines in one code block means the copy button copies both, and the two packages ship the same native libraries, so the build fails. Suggest one block per SDK so readers copy only the one they need.
With this change, the "To integrate the Lite SDK, use io.agora.rtc:lite-sdk instead." sentence in the note that follows becomes redundant and can be removed.
| 1. To integrate the RTC SDK into your Android project, add the following to the `dependencies` block in your project module `build.gradle` file: | |
| - Groovy `build.gradle` | |
| ```groovy | |
| // Choose either the Full SDK or the Lite SDK based on your business needs. | |
| implementation 'io.agora.rtc:full-sdk:x.y.z' | |
| // Or integrate the Lite SDK | |
| implementation 'io.agora.rtc:lite-sdk:x.y.z' | |
| ``` | |
| - Kotlin `build.gradle.kts` | |
| ```kotlin | |
| // Choose either the Full SDK or the Lite SDK based on your business needs. | |
| implementation("io.agora.rtc:full-sdk:x.y.z") | |
| // Or integrate the Lite SDK | |
| implementation("io.agora.rtc:lite-sdk:x.y.z") | |
| ``` | |
| 1. To integrate the RTC SDK into your Android project, add one of the following to the `dependencies` block in your project module `build.gradle` file: | |
| - Full SDK | |
| - Groovy `build.gradle` | |
| ```groovy | |
| implementation 'io.agora.rtc:full-sdk:x.y.z' | |
| ``` | |
| - Kotlin `build.gradle.kts` | |
| ```kotlin | |
| implementation("io.agora.rtc:full-sdk:x.y.z") | |
| ``` | |
| - Lite SDK | |
| - Groovy `build.gradle` | |
| ```groovy | |
| implementation 'io.agora.rtc:lite-sdk:x.y.z' | |
| ``` | |
| - Kotlin `build.gradle.kts` | |
| ```kotlin | |
| implementation("io.agora.rtc:lite-sdk:x.y.z") | |
| ``` |
|
|
||
| Keep the existing Maven repositories in your project, especially `mavenCentral()`, and add the Agora Maven CDN repository. | ||
|
|
||
| :::caution[Note] |
There was a problem hiding this comment.
This callout helps readers identify their Android Gradle Plugin version; nothing breaks if they skip it. :::caution renders with warning styling, which clashes with the "Note" label, so a plain :::note fits the content better.
| :::caution[Note] | |
| :::note |
|
|
||
| :::note | ||
| If your Android project uses <a href="https://docs.gradle.org/current/userguide/declaring_repositories.html#sub:centralized-repository-declaration">dependencyResolutionManagement</a>, the method of adding the Maven Central dependency may differ. | ||
| :::caution[Note] |
There was a problem hiding this comment.
This callout helps readers identify their Android Gradle Plugin version; nothing breaks if they skip it. :::caution renders with warning styling, which clashes with the "Note" label, so a plain :::note fits the content better.
| :::caution[Note] | |
| :::note |
| - [Camera Movement extension](#camera-movement-extension) | ||
| - [Notifications](#notifications) | ||
|
|
||
| :::caution[Note] |
There was a problem hiding this comment.
This notice warns that Gradle builds fail without the CDN repository, so warning styling is right. Dropping the [Note] label keeps the title consistent with the caution styling.
| :::caution[Note] | |
| :::caution |
| <Tabs defaultValue="maven"> | ||
| <TabsList> | ||
| <TabsTrigger value="maven">Maven Central</TabsTrigger> | ||
| <TabsTrigger value="maven">Gradle automatic integration</TabsTrigger> |
There was a problem hiding this comment.
"Gradle automatic integration" reads as a literal translation. The other tab is "Manual download", so a short label is enough.
| <TabsTrigger value="maven">Gradle automatic integration</TabsTrigger> | |
| <TabsTrigger value="maven">Gradle</TabsTrigger> |
| 1. Open the `settings.gradle` file in the project's root directory and add the Maven Central dependency, if it doesn't already exist: | ||
| 1. Open the `settings.gradle` file in the project's root directory and add the Agora Maven CDN repository to `dependencyResolutionManagement.repositories`. | ||
|
|
||
| Keep the existing Maven repositories in your project, especially `mavenCentral()`, and add the Agora Maven CDN repository. |
There was a problem hiding this comment.
The step already says to add the Agora Maven CDN repository, so this sentence repeats it. Naming google() too prevents readers from replacing their whole block and losing the repository that hosts the Android Gradle plugin.
| Keep the existing Maven repositories in your project, especially `mavenCentral()`, and add the Agora Maven CDN repository. | |
| Don't remove existing repositories such as `google()` and `mavenCentral()`. |
| If you cannot find the `dependencyResolutionManagement` field in `settings.gradle`, your Android Gradle Plugin version might be earlier than v7.1.0. | ||
|
|
||
| For details, see [Android Gradle Plugin Release Note v7.1.0](https://developer.android.com/build/releases/past-releases/agp-7-1-0-release-notes). |
There was a problem hiding this comment.
Android's docs write "Android Gradle plugin" (lowercase p), and Google style prefers "7.1.0" over "v7.1.0". The link text should also match the linked page's title.
| If you cannot find the `dependencyResolutionManagement` field in `settings.gradle`, your Android Gradle Plugin version might be earlier than v7.1.0. | |
| For details, see [Android Gradle Plugin Release Note v7.1.0](https://developer.android.com/build/releases/past-releases/agp-7-1-0-release-notes). | |
| If you cannot find the `dependencyResolutionManagement` field in `settings.gradle`, your Android Gradle plugin version might be earlier than 7.1.0. | |
| For details, see [Android Gradle plugin 7.1.0 release notes](https://developer.android.com/build/releases/past-releases/agp-7-1-0-release-notes). |
| :::info[Note] | ||
|
|
||
| If your Android project uses [dependencyResolutionManagement](https://docs.gradle.org/current/userguide/declaring_repositories.html#sub:centralized-repository-declaration), the method of adding the Maven Central dependency may differ. | ||
| If your Android Gradle Plugin version is earlier than v7.1.0, open the project-level `build.gradle` file and add the following configuration to `allprojects.repositories`: |
There was a problem hiding this comment.
Same plugin-name casing and version format as the callout.
| If your Android Gradle Plugin version is earlier than v7.1.0, open the project-level `build.gradle` file and add the following configuration to `allprojects.repositories`: | |
| If your Android Gradle plugin version is earlier than 7.1.0, open the project-level `build.gradle` file and add the following configuration to `allprojects.repositories`: |
| <Tabs> | ||
| <TabsList> | ||
| <TabsTrigger value="maven-central">Maven Central</TabsTrigger> | ||
| <TabsTrigger value="maven-central">Gradle automatic integration</TabsTrigger> |
There was a problem hiding this comment.
"Gradle automatic integration" reads as a literal translation. The other tab is "Manual integration", so a short label is enough.
| <TabsTrigger value="maven-central">Gradle automatic integration</TabsTrigger> | |
| <TabsTrigger value="maven-central">Gradle</TabsTrigger> |
| 1. Open the `settings.gradle` file in the project's root directory and add the Maven Central dependency, if it doesn't already exist: | ||
| 1. Open the `settings.gradle` file in the project's root directory and add the Agora Maven CDN repository to `dependencyResolutionManagement.repositories`. | ||
|
|
||
| Keep the existing Maven repositories in your project, especially `mavenCentral()`, and add the Agora Maven CDN repository. |
There was a problem hiding this comment.
The step already says to add the Agora Maven CDN repository, so this sentence repeats it. Naming google() too prevents readers from replacing their whole block and losing the repository that hosts the Android Gradle plugin.
| Keep the existing Maven repositories in your project, especially `mavenCentral()`, and add the Agora Maven CDN repository. | |
| Don't remove existing repositories such as `google()` and `mavenCentral()`. |
| If you cannot find the `dependencyResolutionManagement` field in `settings.gradle`, your Android Gradle Plugin version might be earlier than v7.1.0. | ||
|
|
||
| For details, see [Android Gradle Plugin Release Note v7.1.0](https://developer.android.com/build/releases/past-releases/agp-7-1-0-release-notes). |
There was a problem hiding this comment.
Android's docs write "Android Gradle plugin" (lowercase p), and Google style prefers "7.1.0" over "v7.1.0". The link text should also match the linked page's title.
| If you cannot find the `dependencyResolutionManagement` field in `settings.gradle`, your Android Gradle Plugin version might be earlier than v7.1.0. | |
| For details, see [Android Gradle Plugin Release Note v7.1.0](https://developer.android.com/build/releases/past-releases/agp-7-1-0-release-notes). | |
| If you cannot find the `dependencyResolutionManagement` field in `settings.gradle`, your Android Gradle plugin version might be earlier than 7.1.0. | |
| For details, see [Android Gradle plugin 7.1.0 release notes](https://developer.android.com/build/releases/past-releases/agp-7-1-0-release-notes). |
| For details, see [Android Gradle Plugin Release Note v7.1.0](https://developer.android.com/build/releases/past-releases/agp-7-1-0-release-notes). | ||
| ::: | ||
|
|
||
| If your Android Gradle Plugin version is earlier than v7.1.0, open the project-level `build.gradle` file and add the following configuration to `allprojects.repositories`: |
There was a problem hiding this comment.
Same plugin-name casing and version format as the callout.
| If your Android Gradle Plugin version is earlier than v7.1.0, open the project-level `build.gradle` file and add the following configuration to `allprojects.repositories`: | |
| If your Android Gradle plugin version is earlier than 7.1.0, open the project-level `build.gradle` file and add the following configuration to `allprojects.repositories`: |
| - [Notifications](#notifications) | ||
|
|
||
| :::caution[Note] | ||
| Since September 14, 2026, Gradle automatic integration for the Android SDK requires adding the Agora Maven CDN repository. For the configuration steps, see [Install the SDK](/en/realtime-media/rtc/get-started-sdk#install-the-sdk). |
There was a problem hiding this comment.
Suggest an active, second-person instruction instead of the noun phrase "Gradle automatic integration … requires adding".
| Since September 14, 2026, Gradle automatic integration for the Android SDK requires adding the Agora Maven CDN repository. For the configuration steps, see [Install the SDK](/en/realtime-media/rtc/get-started-sdk#install-the-sdk). | |
| Starting September 14, 2026, you must add the Agora Maven CDN repository to install the Android SDK with Gradle. For the configuration steps, see [Install the SDK](/en/realtime-media/rtc/get-started-sdk#install-the-sdk). |
| When integrating through the [Direct download](../../../sdks.md) link, manually delete the extension files that you do not need to use. | ||
|
|
||
| #### Remove extensions when integrating using Maven Central | ||
| #### Remove extensions when integrating automatically with Gradle |
There was a problem hiding this comment.
"Integrating automatically with Gradle" reads as a literal translation. No page links to this heading's anchor, so renaming it is safe.
| #### Remove extensions when integrating automatically with Gradle | |
| #### Remove extensions when installing with Gradle |
| Before integrating the Android SDK automatically with Gradle, make sure you have added the Agora Maven CDN repository. For the configuration steps, see [Install the SDK](/en/realtime-media/rtc/get-started-sdk#install-the-sdk). | ||
|
|
||
| When integrating the Android SDK automatically with Gradle, you can modify the `/Gradle Scripts/build.gradle(Module: <projectname>.app)` file to specify the dynamic libraries you need to integrate and exclude extensions you do not need to use. For details on the correspondence between each file in the Android SDK and the fields in `dependencies`, see [implementation fields](#integrating-extensions-into-your-project) for details. |
There was a problem hiding this comment.
These two paragraphs open almost the same way, and the second sentence says "for details" twice. Suggest merging them and simplifying "the correspondence between each file … and the fields".
| Before integrating the Android SDK automatically with Gradle, make sure you have added the Agora Maven CDN repository. For the configuration steps, see [Install the SDK](/en/realtime-media/rtc/get-started-sdk#install-the-sdk). | |
| When integrating the Android SDK automatically with Gradle, you can modify the `/Gradle Scripts/build.gradle(Module: <projectname>.app)` file to specify the dynamic libraries you need to integrate and exclude extensions you do not need to use. For details on the correspondence between each file in the Android SDK and the fields in `dependencies`, see [implementation fields](#integrating-extensions-into-your-project) for details. | |
| When you install the Android SDK with Gradle, you can modify the `/Gradle Scripts/build.gradle(Module: <projectname>.app)` file to specify the dynamic libraries you need and exclude extensions you don't use. Before you do, add the Agora Maven CDN repository as described in [Install the SDK](/en/realtime-media/rtc/get-started-sdk#install-the-sdk). To see which `implementation` field corresponds to each file in the Android SDK, see [implementation fields](#integrating-extensions-into-your-project). |
| ### Integrating extensions into your project | ||
|
|
||
| When integrating the Android SDK through Maven Central, you can modify the `dependencies` field in the `/Gradle Scripts/build.gradle(Module: <projectname>.app)` file to specify the dynamic libraries you need to integrate. The correspondence between each file and `implementation` field in the SDK is detailed in the table below: | ||
| When integrating the Android SDK automatically with Gradle, you can modify the `dependencies` field in the `/Gradle Scripts/build.gradle(Module: <projectname>.app)` file to specify the dynamic libraries you need to integrate. The correspondence between each file and `implementation` field in the SDK is detailed in the table below: |
There was a problem hiding this comment.
Same "integrating automatically" wording as the heading. Also, "the table below" refers to page layout; "the following table" doesn't.
| When integrating the Android SDK automatically with Gradle, you can modify the `dependencies` field in the `/Gradle Scripts/build.gradle(Module: <projectname>.app)` file to specify the dynamic libraries you need to integrate. The correspondence between each file and `implementation` field in the SDK is detailed in the table below: | |
| When you install the Android SDK with Gradle, you can modify the `dependencies` field in the `/Gradle Scripts/build.gradle(Module: <projectname>.app)` file to specify the dynamic libraries you need to integrate. The following table shows which `implementation` field corresponds to each file in the SDK: |
saudsami
left a comment
There was a problem hiding this comment.
Thanks for porting this. The inline suggestions cover the Full/Lite code block split, callout types, and language. The items below couldn't be one-click suggestions.
Please confirm before merge
- Is the CDN actually required for the global SDK? Maven Central still serves byte-identical binaries (for example,
full-rtc-basicandlite-rtc-basic4.6.4 and 4.5.0), and thefull-sdkversion list on both is identical. The CN source, AgoraIO/shengwang-doc-source#2108, is still open and adds the Shengwang CDN, which may be a China-specific concern. If the requirement doesn't apply globally (or only applies from a future version), the release-notes notice shouldn't say "must". - Legacy pages aren't updated. The
video/,voice/,interactive-live-streaming/, andbroadcast-streaming/quickstart and app-size pages are still live and still say Maven Central only. Either merge #1096 first or track the gap.
Also needed
-
Add a Kotlin DSL variant for step 1. New Android Studio projects use
settings.gradle.kts, where the Groovy string form doesn't compile. Step 2 already shows Groovy and Kotlin, so step 1 should match:dependencyResolutionManagement { repositories { mavenCentral() maven { url = uri("https://download.agora.io/maven/") } } } -
SdksCatalognote scope.platformId === 'android' && command?.tool === 'Gradle'also matches the Signaling (io.agora.rtm:rtm-sdk) and Chat (io.agora.rtc:chat-sdk) Android cards, which the announcement doesn't cover. Filter on the RTC product and add a test that the Signaling card doesn't show the note.
Smaller
- Drop
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)from the samples. It isn't needed to add the repository, and readers may copy it into projects that use a different mode. - Link to
/en/realtime-media/rtc/get-started-sdk?platform=android#install-the-sdk. That page has sections for 11 platforms, so a reader whose saved platform is iOS otherwise lands on the iOS section. - In
get-started-sdk.mdx, the plugin-version callout comes before the code block. Invoice-quickstart.mdxit comes after. Suggest putting the code block first on both pages.
saudsami
left a comment
There was a problem hiding this comment.
Some minor language updates
Summary
Source
Synced from the content change in AgoraIO/shengwang-doc-source#2108.
Validation
git diff --checkbun run types:checkbun run test src/components/docs-overview/SdksCatalog.test.tsx src/components/docs-overview/sdk-install-command.test.tsbunx biome check src/components/docs-overview/SdksCatalog.tsx src/components/docs-overview/SdksCatalog.test.tsxNote: full
bun run lintstill fails on existing unrelated repository issues, including Biome schema/version warnings and formatting/hooks diagnostics in untouched files.