-
Notifications
You must be signed in to change notification settings - Fork 26
/
build.gradle.kts
41 lines (33 loc) · 969 Bytes
/
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
import java.io.ByteArrayOutputStream
fun getGitCommit(): String {
val stdout = ByteArrayOutputStream()
exec {
commandLine("git", "rev-parse", "--short", "HEAD")
standardOutput = stdout
}
return stdout.toString().trim()
}
plugins {
id("noxesium.publishing") apply false
}
val javaVersion: Int = 21
allprojects {
group = "com.noxcrew.noxesium"
version = "${property("mod_version")}+${getGitCommit()}"
}
subprojects {
apply<JavaLibraryPlugin>()
apply<Noxesium_publishingPlugin>()
repositories {
mavenCentral()
maven("https://papermc.io/repo/repository/maven-public/")
}
tasks.withType<JavaCompile> {
options.release.set(javaVersion)
sourceCompatibility = javaVersion.toString()
targetCompatibility = javaVersion.toString()
}
extensions.configure<JavaPluginExtension> {
toolchain.languageVersion.set(JavaLanguageVersion.of(javaVersion))
}
}