-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle.kts
53 lines (43 loc) · 1.32 KB
/
build.gradle.kts
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
import com.diffplug.gradle.spotless.SpotlessExtension
import com.diffplug.gradle.spotless.SpotlessPlugin
import xyz.jpenilla.runpaper.task.RunServer
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
alias(libs.plugins.run.paper) apply false
// Kotlin plugin prefers to be applied to parent when it's used in multiple sub-modules.
kotlin("jvm") version "1.9.24" apply false
alias(libs.plugins.spotless)
}
val javaVersion: Int = 21
allprojects {
group = "com.noxcrew.interfaces"
version = "1.3.1-SNAPSHOT"
tasks.withType<JavaCompile> {
sourceCompatibility = javaVersion.toString()
targetCompatibility = javaVersion.toString()
}
}
subprojects {
apply(plugin = "kotlin")
apply<SpotlessPlugin>()
repositories {
mavenCentral()
maven("https://papermc.io/repo/repository/maven-public/")
}
configure<SpotlessExtension> {
kotlin {
ktlint("0.47.1")
}
}
// Configure any existing RunServerTasks
tasks.withType<RunServer> {
minecraftVersion("1.21")
jvmArgs("-Dio.papermc.paper.suppress.sout.nags=true")
}
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = javaVersion.toString()
freeCompilerArgs += listOf("-Xexplicit-api=strict")
}
}
}