forked from funniray/minimap-control
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
69 lines (60 loc) · 1.74 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
plugins {
`java-library`
id("com.github.johnrengelman.shadow") version "7.1.2"
}
val versionStr = "1.3.1"
group = "net.edenor.minimap"
version = versionStr
repositories {
mavenCentral()
maven {
url = uri("https://repo.papermc.io/repository/maven-public/")
}
maven {
url = uri("https://oss.sonatype.org/content/groups/public/")
}
maven {
url = uri("https://repo.viaversion.com")
}
}
val javaTarget = 21
java {
sourceCompatibility = JavaVersion.toVersion(javaTarget)
targetCompatibility = JavaVersion.toVersion(javaTarget)
if (JavaVersion.current() < JavaVersion.toVersion(javaTarget)) {
toolchain.languageVersion.set(JavaLanguageVersion.of(javaTarget))
}
}
dependencies {
// Main Dependencies
compileOnly("dev.folia:folia-api:1.20.1-R0.1-SNAPSHOT")
compileOnly("com.viaversion:viaversion-api:5.0.1")
// Common Dependencies
implementation("net.kyori:adventure-api:4.15.0")
implementation("net.kyori:adventure-nbt:4.15.0")
implementation("net.kyori:adventure-text-minimessage:4.15.0")
compileOnly("com.google.guava:guava:32.0.0-android")
compileOnly("com.google.code.gson:gson:2.8.9")
}
tasks {
processResources {
outputs.upToDateWhen { false }
eachFile { expand("version" to project.version) }
}
build {
dependsOn(shadowJar)
}
shadowJar {
exclude("com/google/gson/**")
exclude("org/apache/commons/**")
exclude("org/yaml/snakeyaml/**")
archiveBaseName.set("${rootProject.name}-folia")
archiveClassifier.set("")
doLast {
copy {
from(archiveFile)
into("${rootProject.projectDir}/build")
}
}
}
}