Skip to content

docs: add Gradle dependency tutorial in README#4304

Open
VenkataAnilKumar wants to merge 1 commit into
alibaba:2025.1.xfrom
VenkataAnilKumar:docs/217-add-gradle-tutorial
Open

docs: add Gradle dependency tutorial in README#4304
VenkataAnilKumar wants to merge 1 commit into
alibaba:2025.1.xfrom
VenkataAnilKumar:docs/217-add-gradle-tutorial

Conversation

@VenkataAnilKumar

Copy link
Copy Markdown

Summary\nAdd Gradle dependency usage documentation to both English and Chinese README files, including release and snapshot configuration examples.\n\n## Changes\n- Add Gradle release BOM usage examples.\n- Add Gradle snapshot repository and credentials examples.\n- Update both \README.md\ and \README-zh.md.\n\nCloses #217

Copilot AI review requested due to automatic review settings April 17, 2026 21:24
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Gradle dependency usage instructions to the project documentation (English + Chinese) so users can consume release and snapshot BOMs (including GitHub Packages authentication for snapshots), addressing the missing Gradle tutorial requested in #217.

Changes:

  • Document Gradle BOM import for release versions.
  • Document Gradle snapshot repository + credentials configuration for GitHub Packages.
  • Mirror the above additions in both README.md and README-zh.md.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
README.md Adds Gradle dependency (release + snapshot) setup instructions and credential guidance.
README-zh.md Adds the same Gradle dependency instructions in Chinese.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
Comment on lines +139 to +147
Use Maven Central BOM in your `build.gradle` (or `build.gradle.kts`) via `platform`:

```groovy
dependencies {
implementation platform("com.alibaba.cloud:spring-cloud-alibaba-dependencies:2025.1.0.0")

// choose starter(s) as needed
implementation "com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-config"
}

Copilot AI Apr 17, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The section mentions build.gradle.kts, but the example is Groovy DSL (and will not paste directly into Kotlin DSL). Either add a Kotlin DSL variant (including dependencies { implementation(platform("...")) } syntax) or adjust the text to only reference build.gradle/Groovy.

Copilot uses AI. Check for mistakes.
Comment thread README.md
Comment on lines +155 to +163
repositories {
mavenCentral()
maven {
url = uri("https://maven.pkg.github.com/alibaba/spring-cloud-alibaba")
credentials {
username = findProperty("gpr.user") ?: System.getenv("GITHUB_USERNAME")
password = findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
}
}

Copilot AI Apr 17, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the GitHub Packages repository used only for snapshots, consider restricting it to snapshots (Gradle equivalent of the earlier Maven <releases><enabled>false</enabled></releases> / <snapshots><enabled>true</enabled></snapshots>). Without this, Gradle may attempt release resolution against GitHub Packages, which can slow dependency resolution and cause surprising results.

Copilot uses AI. Check for mistakes.
Comment thread README.md
Comment thread README-zh.md
Comment on lines +143 to +152
在 `build.gradle`(或 `build.gradle.kts`)中通过 `platform` 引入 BOM:

```groovy
dependencies {
implementation platform("com.alibaba.cloud:spring-cloud-alibaba-dependencies:2025.1.0.0")

// 按需选择 starter
implementation "com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-config"
}
```

Copilot AI Apr 17, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里提到可用于 build.gradle.kts,但示例代码块是 Groovy DSL(Kotlin DSL 不能直接复制粘贴使用)。建议补充一个 Kotlin DSL 版本的示例,或把文案调整为仅针对 build.gradle

Copilot uses AI. Check for mistakes.
Comment thread README-zh.md
Comment thread README-zh.md
@xuxiaowei-com-cn

Copy link
Copy Markdown
Collaborator

Please sign the CLA agreement.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants