1
0
mirror of https://github.com/mamoe/mirai.git synced 2025-04-03 14:20:10 +08:00

Rename all 'fillBuildConstants' tasks to 'generateBuildConstants' and ensure generated files are not versioned. Update docs and CI build config

This commit is contained in:
Him188 2021-12-26 17:44:43 +00:00
parent 41b424c555
commit b43e6c1957
4 changed files with 10 additions and 19 deletions
.github/workflows
mirai-console
docs
tools/gradle-plugin

View File

@ -45,11 +45,6 @@ jobs:
- name: Check keys
run: ./gradlew ensureMavenCentralAvailable
- name: fillBuildConstants
run: >
./gradlew
fillBuildConstants --scan
- name: Assemble
run: ./gradlew assemble --scan

View File

@ -38,11 +38,6 @@ jobs:
SNAPSHOTS_PUBLISHING_URL: ${{ secrets.SNAPSHOTS_PUBLISHING_URL }}
CURRENT_BRANCH_NAME: dev
- name: fillBuildConstants
run: >
./gradlew
fillBuildConstants --scan
- name: Assemble
run: ./gradlew assemble --scan

View File

@ -37,17 +37,16 @@ Mirai Console 项目由四个模块组成后端前端Gradle 插件In
- 请优先使用 Kotlin
- 请遵守 [Kotlin 官方代码风格](https://www.kotlincn.net/docs/reference/coding-conventions.html)
<!--
## 发布版本
(以下内容针对拥有 Mirai Console write 权限的项目成员)
若你要发布一个 Mirai Console dev release
1. 更新 buildSrc/Versions.kt 中 `project` 版本号为目标版本;
2. 本地执行 `./gradlew fillBuildConstants`
3. Push 第 12 步的修改为同一个 commitcommit 备注为版本号名称,如 `1.0.1-dev-1`
4. 添加 Git 版本号 tag格式为 `1.0.1-dev-1`(不带 `v`
5. `git push --tags` 推送 tag 更新GitHub Actions 将会检测到 tag 更新并执行 JCenter 发布。
1. 添加 Git 版本号 tag格式为 `v1.0.1-dev-1`
2. `git push --tags` 推送 tag 更新GitHub Actions 将会检测到 tag 更新并执行 JCenter 发布。
若你要发布一个 Mirai Console 稳定版 release请按顺序进行如下检查
@ -64,3 +63,5 @@ Mirai Console 项目由四个模块组成后端前端Gradle 插件In
- 完整列举公开 API 的任何变动,简要描述或省略内部变动;
- 为更改按 “后端”“前端”“IDE 插件”“Gradle 插件” 分类;
8. 点击 `Publish`。GitHub Actions 将会检测到 tag 更新并执行 JCenter 发布。
-->

View File

@ -98,9 +98,7 @@ tasks.check {
}
tasks {
val compileKotlin by getting {}
val fillBuildConstants by registering {
val generateBuildConstants by registering {
group = "mirai"
doLast {
projectDir.resolve("src/main/kotlin/VersionConstants.kt").apply { createNewFile() }
@ -112,7 +110,9 @@ tasks {
}
}
compileKotlin.dependsOn(fillBuildConstants)
afterEvaluate {
getByName("compileKotlin").dependsOn(generateBuildConstants)
}
}
configurePublishing("mirai-console-gradle")