change to kotlin (it works unlike another private project)
This commit is contained in:
parent
436e9f46ce
commit
8f8bb71c1b
7 changed files with 114 additions and 60 deletions
60
build.gradle.kts
Normal file
60
build.gradle.kts
Normal file
|
@ -0,0 +1,60 @@
|
|||
plugins {
|
||||
kotlin("jvm") version "2.0.0"
|
||||
id("com.github.johnrengelman.shadow") version "8.1.1"
|
||||
id("net.kyori.blossom") version "2.1.0"
|
||||
}
|
||||
|
||||
group = "moe.jansel"
|
||||
version = "1.0-SNAPSHOT"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
name = "papermc-repo"
|
||||
url = uri("https://repo.papermc.io/repository/maven-public/")
|
||||
}
|
||||
maven {
|
||||
name = "sonatype"
|
||||
url = uri("https://oss.sonatype.org/content/groups/public/")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var ktorVersion = "2.3.11"
|
||||
|
||||
dependencies {
|
||||
compileOnly ("io.papermc.paper:paper-api:1.20.6-R0.1-SNAPSHOT")
|
||||
implementation("org.jetbrains.kotlin:kotlin-stdlib")
|
||||
implementation("org.bstats:bstats-bukkit:3.0.2")
|
||||
implementation("com.google.code.gson:gson:2.11.0")
|
||||
// Ktor
|
||||
implementation("io.ktor:ktor-client-core:$ktorVersion")
|
||||
implementation("io.ktor:ktor-client-cio:$ktorVersion")
|
||||
implementation("io.ktor:ktor-client-content-negotiation:$ktorVersion")
|
||||
implementation("io.ktor:ktor-client-serialization:$ktorVersion")
|
||||
implementation("io.ktor:ktor-serialization-kotlinx-json:$ktorVersion")
|
||||
// Adventure API
|
||||
implementation("net.kyori:adventure-api:4.17.0")
|
||||
implementation("net.kyori:adventure-text-minimessage:4.17.0")
|
||||
implementation("net.kyori:adventure-platform-bukkit:4.3.3")
|
||||
}
|
||||
|
||||
kotlin {
|
||||
sourceSets["main"].apply {
|
||||
kotlin.srcDir("src/main/kotlin")
|
||||
}
|
||||
jvmToolchain(21)
|
||||
compilerOptions {
|
||||
apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_0)
|
||||
}
|
||||
}
|
||||
|
||||
tasks.named("compileKotlin", org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask::class.java) {
|
||||
compilerOptions {
|
||||
freeCompilerArgs.add("-Xexport-kdoc")
|
||||
}
|
||||
}
|
||||
|
||||
tasks.shadowJar {
|
||||
relocate("org.bstats", "moe.jansel")
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue