Skip to content

Commit 2aa31f8

Browse files
authored
Merge pull request #316 from simple-robot/dev/main
release: v4.2.0
2 parents e5c39ea + 1c9fa68 commit 2aa31f8

File tree

101 files changed

+4955
-987
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+4955
-987
lines changed

.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,12 @@ updates:
1010
assignees:
1111
- ForteScarlet
1212
open-pull-requests-limit: 10
13+
14+
ignore:
15+
- dependency-name: 'io.ktor:*'
16+
versions: ['3.+']
17+
- dependency-name: 'io.ktor.plugin'
18+
versions: ['3.+']
19+
- dependency-name: 'love.forte.plugin.suspend-transform:*'
20+
- dependency-name: 'love.forte.plugin.suspend-transform'
21+
- dependency-name: 'org.jetbrains.dokka:*'

.github/workflows/kdoc.yml.bk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Gradle generate documentation
2929
uses: gradle/gradle-build-action@v2
3030
with:
31-
gradle-version: 8.5
31+
gradle-version: 8.8
3232
arguments: |
3333
-Porg.gradle.jvmargs="-Xmx4g -Xms4g -XX:MaxMetaspaceSize=2g -Dfile.encoding=UTF-8"
3434
-Porg.gradle.daemon=false

.github/workflows/publish-kdoc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
env:
77
JAVA_VERSION: 21
88
JAVA_DISTRIBUTION: zulu
9-
GRADLE_VERSION: 8.5
9+
GRADLE_VERSION: 8.10.2
1010
IS_CI: true
1111
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
1212
GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
@@ -39,7 +39,7 @@ jobs:
3939
with:
4040
gradle-version: ${{ env.GRADLE_VERSION }}
4141
arguments: |
42-
dokkaHtmlMultiModule
42+
dokkaGenerate
4343
--info
4444
--warning-mode all
4545
-x test

.github/workflows/publish-release.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ env:
1616
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
1717
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
1818
GRADLE_OPTS: "-Xmx8g -Xms2g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8"
19-
GRADLE_VERSION: 8.5
19+
GRADLE_VERSION: 8.10.2
2020

2121

2222
jobs:
@@ -39,9 +39,15 @@ jobs:
3939
uses: gradle/actions/setup-gradle@v3
4040
with:
4141
gradle-version: ${{ env.GRADLE_VERSION }}
42+
arguments: |
43+
assemble
44+
allTests
45+
--stacktrace
46+
--warning-mode all
47+
-Pkotlin.native.enableKlibsCrossCompilation=false
4248
43-
- name: Run all tests
44-
run: gradle assemble allTests --stacktrace --warning-mode all
49+
# - name: Run all tests
50+
# run: gradle assemble allTests --stacktrace --warning-mode all -Pkotlin.native.enableKlibsCrossCompilation=false
4551

4652
- name: Upload test reports
4753
uses: actions/upload-artifact@v4
@@ -56,7 +62,7 @@ jobs:
5662
needs: run-test
5763
# 交叉编译 support
5864
# see https://kotlinlang.org/docs/multiplatform-publish-lib.html#host-requirements
59-
runs-on: macos-latest
65+
runs-on: ubuntu-latest
6066
steps:
6167
- uses: actions/checkout@v4
6268
- uses: actions/setup-java@v4
@@ -136,7 +142,7 @@ jobs:
136142
with:
137143
gradle-version: ${{ env.GRADLE_VERSION }}
138144
arguments: |
139-
dokkaHtmlMultiModule
145+
dokkaGenerate
140146
--info
141147
--warning-mode all
142148
-x test

.github/workflows/publish-snapshot.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ env:
3333
SIMBOT_IS_SNAPSHOT: true
3434
SIMBOT_SNAPSHOT_ONLY: true
3535
GRADLE_OPTS: "-Dfile.encoding=UTF-8"
36-
GRADLE_VERSION: 8.5
36+
GRADLE_VERSION: 8.10.2
3737

3838

3939
jobs:
@@ -56,14 +56,20 @@ jobs:
5656
uses: gradle/actions/setup-gradle@v3
5757
with:
5858
gradle-version: ${{ env.GRADLE_VERSION }}
59+
arguments: |
60+
assemble
61+
allTests
62+
--stacktrace
63+
--warning-mode all
64+
-Pkotlin.native.enableKlibsCrossCompilation=false
5965
60-
- name: Gradle run all tests
61-
run: gradle assemble allTests --stacktrace --warning-mode all
66+
# - name: Gradle run all tests
67+
# run: gradle assemble allTests --stacktrace --warning-mode all -Pkotlin.native.enableKlibsCrossCompilation=false
6268

6369
publish-snapshots:
6470
name: Publish snapshots
6571
needs: run-test
66-
runs-on: macos-latest
72+
runs-on: ubuntu-latest
6773
steps:
6874
- uses: actions/checkout@v4
6975
- uses: actions/setup-java@v4
@@ -117,7 +123,7 @@ jobs:
117123
--warning-mode all
118124
-x test
119125
--build-cache
120-
dokkaHtmlMultiModule
126+
dokkaGenerate
121127
122128
- name: Push to doc repository
123129
uses: peaceiris/actions-gh-pages@v3

.github/workflows/publish-v4-release.yml.bk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ jobs:
4040
- name: Gradle Run Test
4141
uses: gradle/gradle-build-action@v2
4242
with:
43-
gradle-version: 8.5
43+
gradle-version: 8.8
4444
arguments: assemble test -Porg.gradle.daemon=false
4545

4646
# setup Gradle
4747
- name: Publish Release
4848
uses: gradle/gradle-build-action@v2
4949
with:
50-
gradle-version: 8.5
50+
gradle-version: 8.8
5151
arguments: |
5252
publishToSonatype
5353
closeAndReleaseStagingRepositories
@@ -105,7 +105,7 @@ jobs:
105105
- name: Gradle publish snapshot
106106
uses: gradle/gradle-build-action@v2
107107
with:
108-
gradle-version: 8.5
108+
gradle-version: 8.8
109109
arguments: |
110110
publishToSonatype
111111
closeAndReleaseStagingRepositories
@@ -141,7 +141,7 @@ jobs:
141141
- name: Gradle generate documentation
142142
uses: gradle/gradle-build-action@v2
143143
with:
144-
gradle-version: 8.5
144+
gradle-version: 8.8
145145
arguments: |
146146
dokkaHtmlMultiModule
147147
--info

.github/workflows/publish-v4-snapshot.yml.bk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
- name: Gradle test and publish snapshot
5858
uses: gradle/gradle-build-action@v2
5959
with:
60-
gradle-version: 8.5
60+
gradle-version: 8.8
6161
arguments: |
6262
test
6363
publishToSonatype
@@ -89,7 +89,7 @@ jobs:
8989
- name: Gradle generate documentation
9090
uses: gradle/gradle-build-action@v2
9191
with:
92-
gradle-version: 8.5
92+
gradle-version: 8.8
9393
arguments: |
9494
-Porg.gradle.jvmargs="-Xmx4g -Xms4g -XX:MaxMetaspaceSize=2g -Dfile.encoding=UTF-8"
9595
-Porg.gradle.daemon=false

.github/workflows/test-branch.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ jobs:
3333
with:
3434
distribution: 'zulu'
3535
java-version: 21
36-
# cache: 'gradle'
36+
cache: 'gradle'
3737

3838
- name: Run All Tests
3939
uses: gradle/actions/setup-gradle@v3
4040
with:
41-
gradle-version: 8.5
41+
gradle-version: 8.10.2
4242
arguments: |
4343
assemble
4444
build
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="dokkaGenerate" type="GradleRunConfiguration" factoryName="Gradle">
3+
<ExternalSystemSettings>
4+
<option name="executionName" />
5+
<option name="externalProjectPath" value="$PROJECT_DIR$" />
6+
<option name="externalSystemIdString" value="GRADLE" />
7+
<option name="scriptParameters" value="--warning-mode all" />
8+
<option name="taskDescriptions">
9+
<list />
10+
</option>
11+
<option name="taskNames">
12+
<list>
13+
<option value="dokkaGenerate" />
14+
</list>
15+
</option>
16+
<option name="vmOptions" />
17+
</ExternalSystemSettings>
18+
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
19+
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
20+
<DebugAllEnabled>false</DebugAllEnabled>
21+
<RunAsTest>false</RunAsTest>
22+
<method v="2" />
23+
</configuration>
24+
</component>

build.gradle.kts

Lines changed: 58 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022-2024. ForteScarlet.
2+
* Copyright (c) 2022-2025. ForteScarlet.
33
*
44
* This file is part of simbot-component-qq-guild.
55
*
@@ -17,14 +17,16 @@
1717

1818
import love.forte.gradle.common.core.project.setup
1919
import love.forte.gradle.common.core.repository.Repositories
20-
20+
import love.forte.plugin.suspendtrans.gradle.SuspendTransformPluginExtension
21+
import love.forte.simbot.gradle.suspendtransforms.addSimbotJvmTransforms
2122

2223
plugins {
2324
idea
24-
id("simbot-tencent-guild.changelog-generator")
25-
id("simbot-tencent-guild.dokka-multi-module")
26-
id("simbot-tencent-guild.nexus-publish")
25+
`changelog-generator`
26+
`root-dokka`
27+
`nexus-publish`
2728
alias(libs.plugins.kotlinxBinaryCompatibilityValidator)
29+
id("love.forte.plugin.suspend-transform") apply false
2830
}
2931

3032
setup(P.ComponentQQGuild)
@@ -33,6 +35,10 @@ buildscript {
3335
repositories {
3436
mavenCentral()
3537
}
38+
39+
// dependencies {
40+
// classpath(libs.simbot.gradle)
41+
// }
3642
}
3743

3844
logger.info("=== Current version: {} ===", version)
@@ -47,6 +53,19 @@ allprojects {
4753
snapshotsOnly()
4854
}
4955
}
56+
mavenLocal()
57+
}
58+
}
59+
60+
subprojects {
61+
afterEvaluate {
62+
if (plugins.hasPlugin(libs.plugins.suspendTransform.get().pluginId)) {
63+
extensions.configure<SuspendTransformPluginExtension>("suspendTransformPlugin") {
64+
includeRuntime = false
65+
includeAnnotation = false
66+
addSimbotJvmTransforms()
67+
}
68+
}
5069
}
5170
}
5271

@@ -84,9 +103,42 @@ apiValidation {
84103
"love.forte.simbot.annotations.InternalSimbotAPI",
85104
"love.forte.simbot.qguild.QGInternalApi",
86105
"love.forte.simbot.component.qguild.ExperimentalQGApi",
87-
"love.forte.simbot.qguild.ExperimentalQGMediaApi"
106+
"love.forte.simbot.qguild.ExperimentalQGMediaApi",
107+
"love.forte.simbot.qguild.ed25519.annotations.InternalEd25519Api"
88108
),
89109
)
90110

91111
apiDumpDirectory = "api"
92112
}
113+
114+
//subprojects {
115+
// afterEvaluate {
116+
// val p = this
117+
// if (plugins.hasPlugin("org.jetbrains.dokka")) {
118+
// dokka {
119+
// configSourceSets(p)
120+
// pluginsConfiguration.html {
121+
// configHtmlCustoms(p)
122+
// }
123+
// }
124+
// rootProject.dependencies.dokka(p)
125+
// }
126+
// }
127+
//}
128+
//
129+
//dokka {
130+
// moduleName = "Simple Robot 组件 | QQ"
131+
//
132+
// dokkaPublications.all {
133+
// if (isSimbotLocal()) {
134+
// logger.info("Is 'SIMBOT_LOCAL', offline")
135+
// offlineMode = true
136+
// }
137+
// }
138+
//
139+
// configSourceSets(project)
140+
//
141+
// pluginsConfiguration.html {
142+
// configHtmlCustoms(project)
143+
// }
144+
//}

buildSrc/build.gradle.kts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021-2024. ForteScarlet.
2+
* Copyright (c) 2021-2025. ForteScarlet.
33
*
44
* This file is part of simbot-component-qq-guild.
55
*
@@ -32,7 +32,8 @@ dependencies {
3232
implementation(kotlin("serialization", kotlinVersion))
3333
// for plugin.spring
3434
implementation(kotlin("allopen", kotlinVersion))
35-
implementation(libs.bundles.dokka)
35+
implementation(libs.dokka.plugin)
36+
// implementation(libs.bundles.dokka)
3637

3738
// see https://github.com/gradle-nexus/publish-plugin
3839
implementation("io.github.gradle-nexus:publish-plugin:2.0.0")

0 commit comments

Comments
 (0)