Skip to content

Commit f2cab86

Browse files
committed
fix: support new parsek core changes about plugin config manager
BREAKING CHANGE: This version requires Parsek v1.0.0-beta.7+.
1 parent 61ec9a0 commit f2cab86

File tree

6 files changed

+37
-11
lines changed

6 files changed

+37
-11
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
- uses: actions/setup-java@v3
6161
with:
6262
distribution: temurin
63-
java-version: 8
63+
java-version: 21
6464

6565
- name: Build with Gradle
6666
uses: gradle/actions/setup-gradle@v3

.releaserc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@
2525
}
2626
]
2727
],
28-
"repositoryUrl": "https://github.com/StatuParsek/parsek-plugin-auth-register-notify-webhook.git"
28+
"repositoryUrl": "https://github.com/ParsekDev/parsek-plugin-auth-register-notify-webhook.git"
2929
}

build.gradle.kts

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2+
13
plugins {
2-
kotlin("jvm") version "1.9.20"
3-
kotlin("kapt") version "1.9.20"
4+
kotlin("jvm") version "2.0.21"
5+
kotlin("kapt") version "2.0.21"
46
id("com.github.johnrengelman.shadow") version "8.1.1"
57
`maven-publish`
68
}
@@ -27,9 +29,9 @@ dependencies {
2729
compileOnly(project(mapOf("path" to ":plugins:parsek-plugin-auth")))
2830
compileOnly(project(mapOf("path" to ":plugins:parsek-plugin-database")))
2931
} else {
30-
compileOnly("com.github.StatuParsek:Parsek:main-SNAPSHOT")
31-
compileOnly("com.github.StatuParsek:parsek-plugin-auth:v2.4.2")
32-
compileOnly("com.github.StatuParsek:parsek-plugin-database:v1.2.1")
32+
compileOnly("com.github.parsekdev:Parsek:v1.0.0-beta.7")
33+
compileOnly("com.github.parsekdev:parsek-plugin-auth:v1.0.0-dev.1")
34+
compileOnly("com.github.parsekdev:parsek-plugin-database:v1.0.0-dev.1")
3335
}
3436

3537
compileOnly(kotlin("stdlib-jdk8"))
@@ -115,4 +117,29 @@ publishing {
115117
}
116118
}
117119
}
120+
}
121+
122+
java {
123+
withJavadocJar()
124+
withSourcesJar()
125+
126+
// Use Java 21 for compilation
127+
toolchain {
128+
languageVersion.set(JavaLanguageVersion.of(21))
129+
}
130+
}
131+
132+
kotlin {
133+
jvmToolchain(21) // Ensure Kotlin uses the Java 21 toolchain
134+
}
135+
136+
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
137+
compilerOptions {
138+
jvmTarget.set(JvmTarget.JVM_1_8)
139+
}
140+
}
141+
142+
tasks.withType<JavaCompile> {
143+
sourceCompatibility = "1.8"
144+
targetCompatibility = "1.8"
118145
}

jitpack.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
jdk:
2+
- openjdk21

src/main/kotlin/co/statu/rule/plugins/registerNotifyWebhook/RegisterNotifyWebhookPlugin.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import io.vertx.ext.web.client.WebClient
55
import io.vertx.ext.web.client.WebClientOptions
66

77
class RegisterNotifyWebhookPlugin : ParsekPlugin() {
8-
override suspend fun onLoad() {
8+
override suspend fun onCreate() {
99
val webClient = WebClient.create(vertx, WebClientOptions())
1010

1111
pluginBeanContext.beanFactory.registerSingleton(webClient.javaClass.name, webClient)

src/main/kotlin/co/statu/rule/plugins/registerNotifyWebhook/event/ParsekEventHandler.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,8 @@ class ParsekEventHandler(
1515
) : CoreEventListener {
1616
override suspend fun onConfigManagerReady(configManager: ConfigManager) {
1717
val pluginConfigManager = PluginConfigManager(
18-
configManager,
1918
registerNotifyWebhookPlugin,
2019
RegisterNotifyWebhookConfig::class.java,
21-
listOf(),
22-
listOf("register-notify-webhook")
2320
)
2421

2522
registerNotifyWebhookPlugin.pluginBeanContext.beanFactory.registerSingleton(

0 commit comments

Comments
 (0)