Skip to content

Commit c938765

Browse files
committed
improve(docs): improve doc
1 parent 67543ee commit c938765

File tree

2 files changed

+34
-5
lines changed

2 files changed

+34
-5
lines changed

docs/docs/installation.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,22 @@ sidebar_position: 2
77
import Tabs from '@theme/Tabs';
88
import TabItem from '@theme/TabItem';
99
import { GradlePluginDSL, GradlePluginLegacy } from '@site/src/components/Snippets';
10+
import versionInfo from '@site/src/version.json';
1011

1112
This guide covers how to install and set up the Kotlin Suspend Transform Compiler Plugin in your project.
1213

1314
## Version Information
1415

16+
- The latest version on which the current document is based
17+
<small>(usually a version that does not include `Beta` or `RC`, etc.)</small>: <br/>
18+
**v{versionInfo.version}**
19+
20+
- The latest version in the Maven repository and Gradle plugin portal: <br/>
21+
[![Maven Central](https://img.shields.io/maven-central/v/love.forte.plugin.suspend-transform/suspend-transform-plugin)](https://repo1.maven.org/maven2/love/forte/plugin/suspend-transform/suspend-transform-plugin/)
22+
[![Gradle Plugin Portal](https://img.shields.io/gradle-plugin-portal/v/love.forte.plugin.suspend-transform)](https://plugins.gradle.org/plugin/love.forte.plugin.suspend-transform)
23+
24+
- The all releases: [Go to GitHub Releases](https://github.com/ForteScarlet/kotlin-suspend-transform-compiler-plugin/releases)
25+
1526
### Version Naming Convention
1627

1728
Before `0.9.0` (included), the naming convention for versions was `x.y.z`.
@@ -42,7 +53,6 @@ From my memory and guess, Kotlin versions have a higher probability of incompati
4253
and a smaller probability of incompatibility when patch is added (e.g. `1.9.21` -> `1.9.22`).
4354
:::
4455

45-
4656
## Gradle Setup
4757

4858
<Tabs>
@@ -69,6 +79,10 @@ suspendTransformPlugin {
6979
}
7080
```
7181

82+
## Configuration
83+
84+
For more information on this topic, please refer to [Configuration](./configuration/configuration.md).
85+
7286
## Dependencies
7387

7488
Plugins may automatically introduce some dependencies.
@@ -85,11 +99,11 @@ K2 is supported since `v0.7.0`.
8599

86100
### IDE support in current development projects
87101

88-
The IDE does not support highlighting for projects that currently use compiler plugins.
102+
The IDE does **NOT** support highlighting for projects that currently use compiler plugins.
89103
If you want to verify that the compiler plugin is working, you can:
90104

91105
- JVM platform:
92-
- Check the compiled class file or its decompiled result.
106+
- Check the compiled `.class` file or its decompiled result.
93107
- Use reflection to access the expected function in unit testing.
94108
- JS platform:
95109
- Check whether the function is generated correctly by generating a `.d.ts` file.

docs/i18n/zh-CN/docusaurus-plugin-content-docs/current/installation.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,22 @@ sidebar_position: 2
77
import Tabs from '@theme/Tabs';
88
import TabItem from '@theme/TabItem';
99
import { GradlePluginDSL, GradlePluginLegacy } from '@site/src/components/Snippets';
10+
import versionInfo from '@site/src/version.json';
1011

1112
本指南介绍如何在您的项目中安装和设置 Kotlin 挂起函数转换编译器插件。
1213

1314
## 版本信息
1415

16+
- 当前文档构建于的最新版本
17+
<small>(通常是不包含 `Beta`, `RC` 等的版本)</small>: <br/>
18+
**v{versionInfo.version}**
19+
20+
- Maven 仓库和 Gradle 插件中的最新版本: <br />
21+
[![Maven Central](https://img.shields.io/maven-central/v/love.forte.plugin.suspend-transform/suspend-transform-plugin)](https://repo1.maven.org/maven2/love/forte/plugin/suspend-transform/suspend-transform-plugin/)
22+
[![Gradle Plugin Portal](https://img.shields.io/gradle-plugin-portal/v/love.forte.plugin.suspend-transform)](https://plugins.gradle.org/plugin/love.forte.plugin.suspend-transform)
23+
24+
- 所有发行版: [前往 GitHub Releases](https://github.com/ForteScarlet/kotlin-suspend-transform-compiler-plugin/releases)
25+
1526
### 版本命名约定
1627

1728
`0.9.0`(包含)之前,版本的命名约定是 `x.y.z`
@@ -69,6 +80,10 @@ suspendTransformPlugin {
6980
}
7081
```
7182

83+
## 配置
84+
85+
详细的配置说明请参考 [配置](./configuration/configuration.md)
86+
7287
## 依赖项
7388

7489
插件可能会自动引入一些依赖项。
@@ -85,11 +100,11 @@ suspendTransformPlugin {
85100

86101
### 当前开发项目中的 IDE 支持
87102

88-
IDE 不支持对当前使用编译器插件的项目进行高亮显示
103+
IDE **不支持**对当前使用编译器插件的项目进行高亮显示
89104
如果您想验证编译器插件是否正常工作,您可以:
90105

91106
- JVM 平台:
92-
- 检查编译后的类文件或其反编译结果
107+
- 检查编译后的 `.class` 文件或其反编译结果
93108
- 在单元测试中使用反射访问预期的函数。
94109
- JS 平台:
95110
- 通过生成 `.d.ts` 文件检查函数是否正确生成。

0 commit comments

Comments
 (0)