forked from TownyAdvanced/TownyMenus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
89 lines (70 loc) · 2.01 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
plugins {
java
id("com.github.johnrengelman.shadow") version "8.1.1" apply true
id("xyz.jpenilla.run-paper") version "2.2.2"
}
repositories {
mavenCentral()
// Spigot API
maven {
name = "spigot-repo"
url = uri("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
}
// Towny
maven {
name = "glare-repo"
url = uri("https://repo.glaremasters.me/repository/towny/")
}
// AnvilGUI
maven {
name = "codemc"
url = uri("https://repo.codemc.io/repository/maven-snapshots/")
}
}
dependencies {
compileOnly(libs.spigot)
compileOnly(libs.towny)
compileOnly(libs.jetbrains.annotations)
implementation(libs.anvilgui)
annotationProcessor(libs.jabel)
}
java.sourceCompatibility = JavaVersion.VERSION_17
tasks {
assemble {
dependsOn(shadowJar)
}
shadowJar {
archiveClassifier.set("")
dependencies {
include(dependency("net.wesjd:anvilgui"))
}
relocate("net.wesjd.anvilgui", "io.github.townyadvanced.townymenus.libs.anvilgui")
}
compileJava {
options.encoding = Charsets.UTF_8.name()
options.release.set(17)
}
processResources {
filteringCharset = Charsets.UTF_8.name()
expand("version" to project.version)
}
runServer {
minecraftVersion("1.20.4")
downloadPlugins {
libs.towny.get().version?.let { github("TownyAdvanced", "Towny", it, "towny-${it}.jar") }
// Non required plugins
github("MilkBowl", "Vault", "1.7.3", "Vault.jar")
github("iconomy5legacy", "iConomy", "5.21", "iConomy-5.21.jar")
}
}
}
tasks.withType<JavaCompile> {
options.encoding = Charsets.UTF_8.name()
// Configure source & release versions
// https://github.com/bsideup/jabel
sourceCompatibility = "17"
options.release.set(8)
javaCompiler.set(javaToolchains.compilerFor {
languageVersion.set(JavaLanguageVersion.of(17))
})
}