1- import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
1+ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2+ import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
23
34plugins {
45 alias(libs.plugins.kotlin)
56 alias(libs.plugins.shadow)
6- alias(libs.plugins.kapt)
7- `maven- publish`
87}
98
10- val baseVersion = " 0.0.4"
11- val commitHash = System .getenv(" COMMIT_HASH" )
12- val snapshotversion = " ${baseVersion} -dev.$commitHash "
13-
149allprojects {
15- group = " app.simplecloud.plugin.command "
16- version = if (commitHash != null ) snapshotversion else baseVersion
10+ group = " app.simplecloud.plugin"
11+ version = " 0.0.5 "
1712
1813 repositories {
19- mavenLocal()
2014 mavenCentral()
2115 maven(" https://buf.build/gen/maven" )
2216 maven(" https://repo.simplecloud.app/snapshots" )
2317 maven(" https://repo.papermc.io/repository/maven-public/" )
24- maven(" https://repo.simplecloud.app/snapshots" )
2518 }
2619}
2720
2821subprojects {
29- apply (plugin = " org.jetbrains.kotlin.jvm " )
30- apply (plugin = " com.gradleup.shadow " )
31- apply (plugin = " org.jetbrains.kotlin.kapt " )
32- apply (plugin = " maven-publish " )
22+ apply {
23+ plugin( " kotlin " )
24+ plugin( " com.gradleup.shadow " )
25+ }
3326
3427 dependencies {
3528 testImplementation(rootProject.libs.kotlin.test)
36- implementation(rootProject.libs.kotlin.jvm)
3729 implementation(rootProject.libs.kotlinx.coroutines.core)
3830 }
3931
40- publishing {
41- publications {
42- create<MavenPublication >(" mavenJava" ) {
43- from(components[" java" ])
44- }
32+ kotlin {
33+ jvmToolchain(25 )
34+ compilerOptions {
35+ jvmTarget = JvmTarget .JVM_25
36+ languageVersion = KotlinVersion .KOTLIN_2_4
37+ apiVersion = KotlinVersion .KOTLIN_2_4
4538 }
4639 }
4740
4841 java {
49- toolchain.languageVersion.set(JavaLanguageVersion .of(21 ))
42+ toolchain.languageVersion.set(JavaLanguageVersion .of(25 ))
5043 }
5144
52- kotlin {
53- jvmToolchain(21 )
54- compilerOptions {
55- apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion .KOTLIN_2_0 )
56- jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget .JVM_21 )
57- }
45+ tasks.test {
46+ useJUnitPlatform()
5847 }
5948
60- tasks.named( " shadowJar" , ShadowJar :: class ) {
49+ tasks.shadowJar {
6150 mergeServiceFiles()
62- relocate(" org.incendo" , " app.simplecloud.plugin.command.relocate.incendo" )
63- relocate(" org.spongepowered" , " app.simplecloud.plugin.command.relocate.spongepowered" )
6451 archiveFileName.set(" ${project.name} .jar" )
65- archiveClassifier.set(" " )
6652 }
67- }
6853
69- tasks.test {
70- useJUnitPlatform()
71- }
54+ tasks.processResources {
55+ filesMatching(" plugin.yml" ) {
56+ expand(
57+ " version" to project.version
58+ )
59+ }
60+ }
7261
73- tasks.processResources {
74- expand(
75- " version" to project.version,
76- " name" to project.name
77- )
7862}
0 commit comments