This repository has been archived by the owner on Jul 29, 2021. It is now read-only.
forked from Pikachu920/TuSKe
-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
81 lines (75 loc) · 2.19 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
import org.apache.tools.ant.filters.ReplaceTokens
apply plugin: 'java'
java {
def targetJava = 8
targetCompatibility = JavaVersion.toVersion(targetJava)
sourceCompatibility = JavaVersion.toVersion(targetJava)
}
repositories {
jcenter()
mavenCentral()
//Spigot
maven {
url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
}
//Skript
maven {
url 'https://raw.githubusercontent.com/bensku/mvn-repo/master'
}
//ViaVersion
maven {
url 'https://repo.viaversion.com/'
}
//Some Skript dependencies to avoid issues
maven {
url 'https://oss.sonatype.org/content/groups/public/'
}
maven {
url 'https://mvn.yawk.at'
}
maven {
url 'https://ci.emc.gs/nexus/content/groups/aikar/'
}
maven {
url 'https://maven.elmakers.com/repository/'
}
//PreicousStone
maven {
url 'https://jitpack.io'
}
}
configurations {
compileWithJar
}
dependencies {
testImplementation group: 'junit', name: 'junit', version: '4.12'
//This is the default bukkit version supported. It is just for javadocs and jar hierarchy
compileOnly 'org.spigotmc:spigot-api:1.12-R0.1-SNAPSHOT'
//Since it uses NMS/OBC stuffs, it's required to manually add the bukkit jars.
compileOnly fileTree(dir: 'dependencies', include: '*.jar')
//Skript
compileOnly 'ch.njol:skript:2.2-dev35b'
//Generex API. Used to expressions to generate strings from regex
compileWithJar files('dependencies/Generex.jar')
//ViaVersion
compileOnly 'com.viaversion:viaversion-api:4.0.0'
compileOnly 'com.viaversion:viaversion-bukkit:4.0.0'
// configurations.compileOnly.extendsFrom(configurations.compileWithJar)
}
//Used to copy the final jar in test server located in at same place
//It requires that you execute "./gradlew clean build copy"
task copy(type: Copy) {
from 'build/libs/TuSKe.jar'
into 'server/plugins'
}
processResources {
filter ReplaceTokens, tokens: [
'version': project.property('version')
]
}
jar {
archiveName 'TuSKe.jar'
from {
configurations.compileWithJar.collect { it.isDirectory() ? it : zipTree(it) }
}
}