Skip to content

Commit

Permalink
Merge pull request #145 from simple-robot/dev/update-simbot-and-KT
Browse files Browse the repository at this point in the history
更新simbot到v4.0.0-RC3, Kotlin到2.0.0
  • Loading branch information
ForteScarlet authored Jun 9, 2024
2 parents f4c910c + 2a22a59 commit 91cd53e
Show file tree
Hide file tree
Showing 90 changed files with 232 additions and 11,202 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
gradle-version: 8.5
arguments: |
publishToSonatype
closeAndReleaseStagingRepository
closeAndReleaseStagingRepositories
--info
--warning-mode all
-x test
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: 8.5
arguments: clean test publishToSonatype closeAndReleaseStagingRepository
arguments: clean test publishToSonatype closeAndReleaseStagingRepositories
env:
SIMBOT_IS_SNAPSHOT: true
SIMBOT_SNAPSHOT_ONLY: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
arguments: |
test
publishToSonatype
closeAndReleaseStagingRepository
closeAndReleaseStagingRepositories
--info
--warning-mode all
-Porg.gradle.jvmargs="-Xmx8g -Xms2g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-v4-release.yml.bk
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
gradle-version: 8.5
arguments: |
publishToSonatype
closeAndReleaseStagingRepository
closeAndReleaseStagingRepositories
--info
--warning-mode all
-x test
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
uses: gradle/gradle-build-action@v3
with:
gradle-version: 8.5
arguments: clean test publishToSonatype closeAndReleaseStagingRepository
arguments: clean test publishToSonatype closeAndReleaseStagingRepositories
env:
SIMBOT_IS_SNAPSHOT: true
SIMBOT_SNAPSHOT_ONLY: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-v4-snapshot.yml.bk
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
arguments: |
test
publishToSonatype
closeAndReleaseStagingRepository
closeAndReleaseStagingRepositories
--info
--warning-mode all
-Porg.gradle.jvmargs="-Xmx8g -Xms2g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,4 @@ gradle-app.setting

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml

.kotlin
2 changes: 1 addition & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ dependencies {
implementation(libs.bundles.dokka)

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

// simbot suspend transform gradle common
implementation(libs.simbot.gradle)
Expand Down
35 changes: 20 additions & 15 deletions buildSrc/src/main/kotlin/JvmConfig.kt
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
/*
* Copyright (c) 2024. ForteScarlet.
* Copyright (c) 2024. ForteScarlet.
*
* This file is part of simbot-component-qq-guild.
* This file is part of simbot-component-kook.
*
* simbot-component-qq-guild is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
* simbot-component-kook is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* simbot-component-qq-guild is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
* simbot-component-kook is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along with simbot-component-qq-guild.
* If not, see <https://www.gnu.org/licenses/>.
* You should have received a copy of the GNU Lesser General Public License
* along with simbot-component-kook,
* If not, see <https://www.gnu.org/licenses/>.
*/

import org.gradle.api.Project
Expand All @@ -23,20 +26,22 @@ import org.gradle.kotlin.dsl.get
import org.gradle.kotlin.dsl.getByName
import org.gradle.kotlin.dsl.withType
import org.gradle.process.CommandLineArgumentProvider
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
import org.jetbrains.kotlin.gradle.dsl.KotlinTopLevelExtension
import org.jetbrains.kotlin.gradle.targets.jvm.KotlinJvmTarget


@OptIn(ExperimentalKotlinGradlePluginApi::class)
inline fun KotlinJvmTarget.configJava(crossinline block: KotlinJvmTarget.() -> Unit = {}) {
withJava()
compilations.all {
kotlinOptions {
javaParameters = true
freeCompilerArgs = freeCompilerArgs + listOf("-Xjvm-default=all")
}
compilerOptions {
javaParameters = true
freeCompilerArgs.addAll(
"-Xjvm-default=all"
)
}

testRuns["test"].executionTask.configure {
Expand Down
30 changes: 0 additions & 30 deletions buildSrc/src/main/kotlin/K2Config.kt

This file was deleted.

2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/P.kt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ object P : ProjectDetail() {
override val homepage: String
get() = HOMEPAGE

private val baseVersion = v(4, 0, 0) - v("beta2")
private val baseVersion = v(4, 0, 0) - v("beta3")

val snapshotVersion = baseVersion - Version.SNAPSHOT
override val version = if (isSnapshot()) snapshotVersion else baseVersion
Expand Down
30 changes: 17 additions & 13 deletions buildSrc/src/main/kotlin/simbot-kook-module-conventions.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
/*
* Copyright (c) 2022-2023. ForteScarlet.
* Copyright (c) 2022-2024. ForteScarlet.
*
* This file is part of simbot-component-kook.
* This file is part of simbot-component-kook.
*
* simbot-component-kook is free software: you can redistribute it and/or modify it under the terms of
* the GNU Lesser General Public License as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
* simbot-component-kook is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* simbot-component-kook is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
* simbot-component-kook is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along with simbot-component-kook,
* If not, see <https://www.gnu.org/licenses/>.
* You should have received a copy of the GNU Lesser General Public License
* along with simbot-component-kook,
* If not, see <https://www.gnu.org/licenses/>.
*/

import love.forte.gradle.common.core.project.setup
Expand Down Expand Up @@ -69,10 +72,11 @@ tasks.getByName<Test>("test") {
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
compilerOptions {
javaParameters = true
// jvmTarget = "1.8"
freeCompilerArgs = freeCompilerArgs + listOf("-Xjvm-default=all")
freeCompilerArgs.addAll(
"-Xjvm-default=all"
)
}
}

Expand Down
16 changes: 8 additions & 8 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
[versions]
kotlin = "1.9.22"
kotlinx-coroutines = "1.8.0"
kotlin = "2.0.0"
kotlinx-coroutines = "1.8.1"
kotlinx-serialization = "1.6.3"
dokka = "1.9.10"
dokka = "1.9.20"
openjdk-jmh = "1.37"
ktor = "2.3.8"
log4j = "2.23.0"
# simbot
simbot = "4.0.0-beta1"
suspendTransform = "0.6.0"
gradleCommon = "0.2.0"
simbot = "4.0.0-RC3"
suspendTransform = "0.8.0-beta1"
gradleCommon = "0.4.0"
# ksp
ksp = "1.9.22-1.0.18"
ksp = "2.0.0-1.0.22"
# https://square.github.io/kotlinpoet/
kotlinPoet = "1.16.0"
kotlinPoet = "1.17.0"

[libraries]
# simbot
Expand Down
Loading

0 comments on commit 91cd53e

Please sign in to comment.