Skip to content

Commit ca84aba

Browse files
authored
Merge pull request #210 from simple-robot/dev/main
Release: v1.8.0
2 parents d72c15b + 1a846f2 commit ca84aba

File tree

29 files changed

+739
-82
lines changed

29 files changed

+739
-82
lines changed

.github/workflows/publish-release.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,15 @@ jobs:
4141
uses: gradle/actions/setup-gradle@v3
4242
with:
4343
gradle-version: ${{ env.GRADLE_VERSION }}
44+
arguments: |
45+
assemble
46+
allTests
47+
--stacktrace
48+
--warning-mode all
49+
-Pkotlin.native.enableKlibsCrossCompilation=false
4450
45-
- name: Run all tests
46-
run: gradle assemble allTests --stacktrace --warning-mode all
51+
# - name: Run all tests
52+
# run: gradle assemble allTests --stacktrace --warning-mode all -Pkotlin.native.enableKlibsCrossCompilation=false
4753

4854
publish-releases:
4955
name: Publish releases

.github/workflows/publish-snapshot.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,15 @@ jobs:
6262
uses: gradle/actions/setup-gradle@v3
6363
with:
6464
gradle-version: ${{ env.GRADLE_VERSION }}
65+
arguments: |
66+
assemble
67+
allTests
68+
--stacktrace
69+
--warning-mode all
70+
-Pkotlin.native.enableKlibsCrossCompilation=false
6571
66-
- name: Run all tests
67-
run: gradle assemble allTests --stacktrace --warning-mode all
72+
# - name: Run all tests
73+
# run: gradle assemble allTests --stacktrace --warning-mode all -Pkotlin.native.enableKlibsCrossCompilation=false
6874

6975
publish-snapshots:
7076
name: Publish snapshots

build.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ apiValidation {
138138
"love.forte.simbot.annotations.InternalSimbotAPI",
139139
"love.forte.simbot.component.onebot.common.annotations.ApiResultConstructor",
140140
"love.forte.simbot.component.onebot.common.annotations.SourceEventConstructor",
141+
142+
// CustomEventResolver
143+
"love.forte.simbot.component.onebot.v11.core.event.ExperimentalCustomEventResolverApi"
141144
),
142145
)
143146

buildSrc/src/main/kotlin/JvmConfig.kt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import org.jetbrains.kotlin.gradle.targets.jvm.KotlinJvmTarget
3030

3131

3232
inline fun KotlinJvmTarget.configJava(jdkVersion: Int, crossinline block: KotlinJvmTarget.() -> Unit = {}) {
33-
withJava()
3433
compilerOptions {
3534
javaParameters.set(true)
3635
jvmTarget.set(JvmTarget.fromTarget(jdkVersion.toString()))
@@ -88,12 +87,15 @@ inline fun Project.configJavaCompileWithModule(
8887
targetCompatibility = jvmVersion
8988

9089
if (moduleName != null) {
91-
options.compilerArgumentProviders.add(
92-
CommandLineArgumentProvider {
90+
options.compilerArgumentProviders.add(CommandLineArgumentProvider {
91+
val sourceSet = sourceSets.findByName("main") ?: sourceSets.findByName("jvmMain")
92+
if (sourceSet != null) {
9393
// Provide compiled Kotlin classes to javac – needed for Java/Kotlin mixed sources to work
94-
listOf("--patch-module", "$moduleName=${sourceSets["main"].output.asPath}")
94+
listOf("--patch-module", "$moduleName=${sourceSet.output.asPath}")
95+
} else {
96+
emptyList()
9597
}
96-
)
98+
})
9799
}
98100

99101
block()

buildSrc/src/main/kotlin/P.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ object P {
3737
override val description: String get() = DESCRIPTION
3838
override val homepage: String get() = HOMEPAGE
3939

40-
const val VERSION = "1.7.0"
41-
const val NEXT_VERSION = "1.7.1"
40+
const val VERSION = "1.8.0"
41+
const val NEXT_VERSION = "1.8.1"
4242

4343
override val snapshotVersion = "$NEXT_VERSION-SNAPSHOT"
4444
override val version = if (isSnapshot()) snapshotVersion else VERSION

buildSrc/src/main/kotlin/simbot-onebot-changelog-generator.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717

1818

19-
tasks.create("createChangelog") {
19+
tasks.register("createChangelog") {
2020
group = "documentation"
2121
doFirst {
2222
val realVersion = P.ComponentOneBot.version.toString()
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Thu Mar 21 17:22:56 CST 2024
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

simbot-component-onebot-common/build.gradle.kts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,6 @@ kotlin {
5959
api(kotlin("test"))
6060
}
6161

62-
jvmMain {
63-
dependencies {
64-
compileOnly(libs.simbot.api)
65-
}
66-
}
67-
6862
jvmTest.dependencies {
6963
implementation(libs.log4j.api)
7064
implementation(libs.log4j.core)

simbot-component-onebot-v11/simbot-component-onebot-v11-common/build.gradle.kts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ kotlin {
5151

5252
sourceSets {
5353
commonMain.dependencies {
54-
implementation(project(":simbot-component-onebot-common"))
55-
implementation(libs.simbot.common.annotations)
54+
api(project(":simbot-component-onebot-common"))
55+
api(libs.simbot.common.annotations)
5656
api(libs.kotlinx.serialization.core)
5757
}
5858

@@ -62,10 +62,6 @@ kotlin {
6262
api(libs.kotlinx.coroutines.test)
6363
}
6464

65-
jvmMain.dependencies {
66-
compileOnly(libs.simbot.common.annotations)
67-
}
68-
6965
jvmTest.dependencies {
7066
compileOnly(libs.simbot.common.annotations)
7167
implementation(libs.log4j.api)

simbot-component-onebot-v11/simbot-component-onebot-v11-core/api/simbot-component-onebot-v11-core.api

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,7 +1104,10 @@ public abstract interface class love/forte/simbot/component/onebot/v11/core/api/
11041104
public abstract fun getAction ()Ljava/lang/String;
11051105
public abstract fun getApiResultDeserializer ()Lkotlinx/serialization/DeserializationStrategy;
11061106
public abstract fun getBody ()Ljava/lang/Object;
1107+
public fun getMethod ()Lio/ktor/http/HttpMethod;
11071108
public abstract fun getResultDeserializer ()Lkotlinx/serialization/DeserializationStrategy;
1109+
public fun resolveUrlAction (Lio/ktor/http/URLBuilder;Ljava/util/Collection;)V
1110+
public fun resolveUrlExtensions (Lio/ktor/http/URLBuilder;)V
11081111
}
11091112

11101113
public final class love/forte/simbot/component/onebot/v11/core/api/OneBotApi$Actions {
@@ -1161,6 +1164,10 @@ public final class love/forte/simbot/component/onebot/v11/core/api/OneBotApiExec
11611164
public final synthetic fun unbox-impl ()Llove/forte/simbot/component/onebot/v11/core/api/OneBotApiExecutable;
11621165
}
11631166

1167+
public final class love/forte/simbot/component/onebot/v11/core/api/OneBotApiKt {
1168+
public static final fun resolveUrl (Llove/forte/simbot/component/onebot/v11/core/api/OneBotApi;Lio/ktor/http/URLBuilder;Ljava/util/Collection;)V
1169+
}
1170+
11641171
public final class love/forte/simbot/component/onebot/v11/core/api/OneBotApiRequests {
11651172
public static final fun getApiLogger ()Lorg/slf4j/Logger;
11661173
public static final synthetic fun request (Llove/forte/simbot/component/onebot/v11/core/api/OneBotApi;Lio/ktor/client/HttpClient;Lio/ktor/http/Url;Ljava/lang/String;Ljava/util/Collection;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
@@ -2125,6 +2132,29 @@ public final class love/forte/simbot/component/onebot/v11/core/component/OneBot1
21252132
public static synthetic fun useOneBot11Component$default (Llove/forte/simbot/application/ApplicationFactoryConfigurer;Llove/forte/simbot/common/function/ConfigurerFunction;ILjava/lang/Object;)V
21262133
}
21272134

2135+
public class love/forte/simbot/component/onebot/v11/core/event/CustomEventResolveException : java/lang/RuntimeException {
2136+
public fun <init> ()V
2137+
public fun <init> (Ljava/lang/String;)V
2138+
public fun <init> (Ljava/lang/String;Ljava/lang/Throwable;)V
2139+
public fun <init> (Ljava/lang/Throwable;)V
2140+
}
2141+
2142+
public abstract interface class love/forte/simbot/component/onebot/v11/core/event/CustomEventResolver$Context {
2143+
public abstract fun getBot ()Llove/forte/simbot/component/onebot/v11/core/bot/OneBotBot;
2144+
public abstract fun getJson ()Lkotlinx/serialization/json/Json;
2145+
public abstract fun getRawEventResolveResult ()Llove/forte/simbot/component/onebot/v11/core/event/RawEventResolveResult;
2146+
}
2147+
2148+
public class love/forte/simbot/component/onebot/v11/core/event/EventResolveException : java/lang/RuntimeException {
2149+
public fun <init> ()V
2150+
public fun <init> (Ljava/lang/String;)V
2151+
public fun <init> (Ljava/lang/String;Ljava/lang/Throwable;)V
2152+
public fun <init> (Ljava/lang/Throwable;)V
2153+
}
2154+
2155+
public abstract interface annotation class love/forte/simbot/component/onebot/v11/core/event/ExperimentalCustomEventResolverApi : java/lang/annotation/Annotation {
2156+
}
2157+
21282158
public abstract interface class love/forte/simbot/component/onebot/v11/core/event/OneBotBotEvent : love/forte/simbot/component/onebot/v11/core/event/OneBotEvent, love/forte/simbot/event/BotEvent {
21292159
public abstract fun getBot ()Llove/forte/simbot/component/onebot/v11/core/bot/OneBotBot;
21302160
}

0 commit comments

Comments
 (0)