forked from awumii/EpicGuard
-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.gradle.kts
54 lines (44 loc) · 1.26 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
import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import java.util.*
plugins {
java
alias(libs.plugins.shadow)
}
allprojects {
apply<JavaPlugin>()
apply<ShadowPlugin>()
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
}
subprojects {
tasks {
withType<ShadowJar> {
val platformName = project.name.replaceFirstChar { if (it.isLowerCase()) it.titlecase(Locale.getDefault()) else it.toString() }
archiveFileName.set("EpicGuard$platformName-${project.version}.jar")
minimize()
// Copy compiled platform jars to '/build' directory for convenience.
if (project.name != "core") {
doLast {
copy {
from(archiveFile)
into("${rootProject.projectDir}/build")
}
}
}
}
build {
dependsOn(shadowJar)
}
withType<Delete> {
delete("run")
}
withType<JavaCompile> {
options.encoding = Charsets.UTF_8.name()
options.release.set(17)
}
}
}