-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
72 lines (61 loc) · 1.91 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.8.21"
kotlin("plugin.serialization") version "1.8.21"
id("com.palantir.git-version") version "3.0.0"
id("com.github.johnrengelman.shadow") version "8.1.1"
application
}
group = "dev.thelecrafter"
version = "1.0.0"
repositories {
mavenCentral()
maven("https://jitpack.io")
maven {
url = uri("https://maven.stckoverflw.net/private")
credentials {
username = "blake"
password = "GqVyx+lg/NNNIpwUKCwqzgECwzLRttCT3DUgkWUv3CxnBF9DNDDpHVDMjT5dR3lG"
}
}
}
dependencies {
implementation("com.github.Minestom.Minestom:Minestom:-SNAPSHOT")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1")
implementation("net.kyori:adventure-text-minimessage:4.13.1")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1")
implementation("net.cherrycave:birgid:0.4.0")
}
kotlin {
jvmToolchain(17)
}
application {
mainClass.set("net.cherrycave.lobby.LauncherKt")
ext.set("Multi-Release", true)
}
val versionDetails: groovy.lang.Closure<com.palantir.gradle.gitversion.VersionDetails> by extra
val details = versionDetails()
tasks {
withType<JavaCompile> {
options.encoding = "UTF-8"
}
withType<KotlinCompile> {
kotlinOptions.jvmTarget = "17"
}
processResources {
val props = mapOf<String, Any>(
"version" to project.version,
"lastTag" to details.lastTag,
"commitDistance" to details.commitDistance,
"gitHash" to details.gitHash,
"gitHashFull" to details.gitHashFull,
"branchName" to details.branchName,
"isCleanTag" to details.isCleanTag
)
inputs.properties(props)
filteringCharset = "UTF-8"
filesMatching("constants.json") {
expand(props)
}
}
}