-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
59 lines (45 loc) · 1.37 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
import org.apache.tools.ant.filters.ReplaceTokens
plugins {
id 'java'
id "io.github.goooler.shadow" version "8.1.7"
}
version = '1.0.1'
compileJava {
options.encoding = 'UTF-8'
}
def minJavaVersion = '17'
def maxJavaVersion = '21'
repositories {
mavenCentral()
maven { url = "https://repo.papermc.io/repository/maven-public/" }
maven { url = "https://repo.skriptlang.org/releases" }
}
dependencies {
compileOnly("io.papermc.paper:paper-api:1.20.6-R0.1-SNAPSHOT")
compileOnly("com.github.SkriptLang:Skript:2.8.6") { transitive = false }
implementation("org.bstats:bstats-bukkit:3.0.2")
}
tasks.withType(JavaCompile).configureEach {
options.compilerArgs += ['-source', '' + minJavaVersion, '-target', '' + maxJavaVersion]
}
build {
dependsOn(shadowJar)
tasks.withType(JavaCompile).tap {
configureEach {
options.compilerArgs.add("-Xlint:unchecked")
options.compilerArgs.add("-Xlint:deprecation")
}
}
}
processResources {
filter ReplaceTokens, tokens: ["version": project.version]
}
shadowJar {
archiveFileName = project.name + "-" + project.version + ".jar"
relocate("org.bstats", "io.github.fusezion.skriptadvancements.metrics")
}
// Run task to build jar to another spot
tasks.register('server', Copy) {
from shadowJar
into 'D:/Austin/Development/TestServer/Paper-1.20.6/plugins'
}