forked from NeumimTo/TownyCivs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
86 lines (76 loc) · 2.42 KB
/
build.gradle
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
plugins {
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'java'
}
group = 'cz.neumimto.towny'
version = 'ALPHA-1.0.0'
repositories {
mavenCentral()
maven {
name = 'papermc-repo'
url = 'https://papermc.io/repo/repository/maven-public/'
}
maven {
name = 'sonatype'
url = 'https://oss.sonatype.org/content/groups/public/'
}
maven {
name = 'glaremasters repo'
url = 'https://repo.glaremasters.me/repository/towny/'
}
maven {
url = "https://repo.aikar.co/content/groups/aikar/"
}
maven {
url = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
}
}
compileJava {
options.compilerArgs += ["-parameters"]
options.fork = true
options.forkOptions.executable = 'javac'
}
test {
useJUnitPlatform()
}
dependencies {
compileOnly 'io.papermc.paper:paper-api:1.18.2-R0.1-SNAPSHOT'
compileOnly 'com.palmergames.bukkit.towny:towny:0.98.1.0'
implementation 'com.electronwill.night-config:hocon:3.6.5'
implementation 'com.google.inject:guice:5.1.0'
implementation 'com.github.stefvanschie.inventoryframework:IF:0.10.5'
implementation "co.aikar:acf-paper:0.5.1-SNAPSHOT"
implementation 'net.kyori:adventure-text-minimessage:4.10.1'
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.1'
testImplementation 'io.papermc.paper:paper-api:1.18.2-R0.1-SNAPSHOT'
}
def targetJavaVersion = 17
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
}
tasks.withType(JavaCompile).configureEach {
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
options.release = targetJavaVersion
}
}
processResources {
def props = [version: version]
inputs.properties props
filteringCharset 'UTF-8'
filesMatching('plugin.yml') {
expand props
}
}
shadowJar {
relocate 'com.electronwill', 'townycolonies.com.electronwill'
relocate 'com.typesafe', 'com.typesafe'
relocate 'com.github.stefvanschie', 'townycolonies.com.github.stefvanschie'
relocate 'com.google.inject', 'townycolonies.com.google.inject'
relocate 'co.aikar.commands', 'townycolonies.acf'
relocate 'co.aikar.locales', 'townycolonies.locales'
}