-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
73 lines (57 loc) · 1.85 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
73 lines (57 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version Dependency.Kotlin.Version
kotlin("plugin.serialization") version "2.1.10"
id("io.papermc.paperweight.userdev") version "1.7.7"
}
dependencies {
implementation(kotlin("stdlib"))
implementation(platform("com.intellectualsites.bom:bom-1.18.x:1.22"))
compileOnly("io.papermc.paper:paper-api:${Dependency.PaperAPI.Version}")
paperDevBundle(Dependency.PaperAPI.Version)
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:${Dependency.Coroutine.Version}")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:${Dependency.Serialization.Version}")
}
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://jitpack.io/")
}
val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions {
jvmTarget = "21"
}
val compileTestKotlin: KotlinCompile by tasks
compileTestKotlin.kotlinOptions {
jvmTarget = "21"
}
java {
toolchain.apply {
languageVersion.set(JavaLanguageVersion.of(21))
}
}
val pluginName = rootProject.name.capitalize()
val packageName = rootProject.name
val aliasName = packageName.capitalize()
extra.apply {
set("pluginName", pluginName)
set("packageName", packageName)
set("aliasName", aliasName)
set("kotlinVersion", Dependency.Kotlin.Version)
set("coroutineVersion", Dependency.Coroutine.Version)
set("serializationVersion", Dependency.Serialization.Version)
}
tasks {
processResources {
outputs.upToDateWhen { false }
filesMatching("*.yml") {
expand(project.properties)
expand(extra.properties)
}
}
register<Jar>("pluginJar") {
archiveBaseName.set(rootProject.name)
archiveClassifier.set("")
from(sourceSets["main"].output)
}
}