This repository has been archived by the owner on May 3, 2024. It is now read-only.
forked from MC-XiaoHei/ISeeYou
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
69 lines (60 loc) · 1.75 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
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
id("java")
id("com.github.johnrengelman.shadow") version "8.1.1"
kotlin("jvm") version "1.9.0"
}
group = "xaviermc.top"
version = "1.1.6"
repositories {
mavenLocal()
maven("https://maven.aliyun.com/repository/public")
mavenCentral()
maven("https://oss.sonatype.org/content/groups/public/")
maven("https://maven.aliyun.com/repository/public")
maven("https://repo.leavesmc.top/releases")
maven("https://repo.leavesmc.top/snapshots")
flatDir {
dirs("libs")
}
}
dependencies {
compileOnly(files("libs/ThemisAPI_0.15.3.jar"))
compileOnly(files("libs/Matrix_7.7.15A.jar"))
compileOnly("top.leavesmc.leaves:leaves-api:1.20.4-R0.1-SNAPSHOT")
implementation("org.jetbrains.kotlin:kotlin-stdlib:1.9.0")
compileOnly("org.bstats:bstats-bukkit:3.0.2")
implementation("com.moandjiezana.toml:toml4j:0.7.2")
}
val targetJavaVersion = 17
java {
val javaVersion = JavaVersion.toVersion(targetJavaVersion)
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion.set(JavaLanguageVersion.of(targetJavaVersion))
}
}
tasks.processResources {
filesMatching("paper-plugin.yml") {
expand(
mapOf(
"version" to version,
)
)
}
}
tasks.withType<JavaCompile>().configureEach {
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible) {
options.release.set(targetJavaVersion)
}
}
tasks.withType<ShadowJar> {
minimize()
exclude("META-INF/*.SF")
exclude("META-INF/*.DSA")
exclude("META-INF/*.RSA")
mergeServiceFiles()
relocate("org.bstats", "xaviermc.top.iseeyou.bstats")
}
kotlin {
jvmToolchain(17)
}