-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
69 lines (57 loc) · 1.6 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
import org.apache.tools.ant.filters.ReplaceTokens
plugins {
id 'java'
id 'com.gradleup.shadow' version '8.3.3'
}
group = 'site.equipable'
version = '1.1.0'
repositories {
mavenCentral()
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/groups/public/"
}
maven {
name = "essentialsx-releases"
url = "https://repo.essentialsx.net/releases/"
}
// Paper
maven { url "https://repo.papermc.io/repository/maven-public/" }
// Skript
maven {
url "https://repo.skriptlang.org/releases"
}
}
shadowJar {
archiveFileName = project.name + "-" + project.version + ".jar"
relocate("org.bstats", "site.equipable.skEssentials.metrics")
}
dependencies {
compileOnly("io.papermc.paper:paper-api:1.19.4-R0.1-SNAPSHOT")
compileOnly("com.github.SkriptLang:Skript:2.7.0")
compileOnly("net.essentialsx:EssentialsX:2.20.1")
implementation("org.bstats:bstats-bukkit:3.0.2")
}
def latestJava = 21
def oldestJava = 17
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}
tasks.withType(JavaCompile).configureEach {
options.compilerArgs += ['-source', '' + oldestJava, '-target', '' + oldestJava]
}
build {
dependsOn(shadowJar)
tasks.withType(JavaCompile).tap {
configureEach {
options.compilerArgs.add("-Xlint:unchecked")
options.compilerArgs.add("-Xlint:deprecation")
}
}
}
processResources {
def props = [version: version]
inputs.properties props
filteringCharset 'UTF-8'
filter ReplaceTokens, tokens: ["version": project.version]
}