docs: add version catalog tutorial

This commit is contained in:
2025-06-05 19:17:05 +08:00
parent cc94e32516
commit bb91504aeb
2 changed files with 40 additions and 0 deletions

View File

@@ -29,6 +29,26 @@ Configure dependency in your project `build.gradle.kts`.
implementation(com.highcapable.pangutext.pangutext.android)
```
### Version Catalog
Add dependency in your project's `gradle/libs.versions.toml`.
```toml
[versions]
pangutext-android = "<version>"
[libraries]
pangutext-android = { module = "com.highcapable.pangutext:pangutext-android", version.ref = "pangutext-android" }
```
Configure dependency in your project `build.gradle.kts`.
```kotlin
implementation(libs.pangutext.android)
```
Please change `<version>` to the version displayed at the top of this document.
### Traditional Method
Configure dependency in your project `build.gradle.kts`.

View File

@@ -29,6 +29,26 @@ libraries:
implementation(com.highcapable.pangutext.pangutext.android)
```
### Version Catalog
在你的项目 `gradle/libs.versions.toml` 中添加依赖。
```toml
[versions]
pangutext-android = "<version>"
[libraries]
pangutext-android = { module = "com.highcapable.pangutext:pangutext-android", version.ref = "pangutext-android" }
```
在你的项目 `build.gradle.kts` 中配置依赖。
```kotlin
implementation(libs.pangutext.android)
```
请将 `<version>` 修改为此文档顶部显示的版本。
### 传统方式
在你的项目 `build.gradle.kts` 中配置依赖。