forked from ProtocolSupport/ProtocolSupportPocketStuff
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
89 lines (70 loc) · 1.73 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
87
88
89
buildscript {
dependencies {
classpath 'org.jdom:jdom2:2.0.6'
classpath 'org.ow2.asm:asm:5.1'
classpath 'org.ow2.asm:asm-commons:5.1'
classpath 'commons-io:commons-io:2.5'
classpath 'org.apache.ant:ant:1.9.7'
classpath 'org.codehaus.plexus:plexus-utils:3.0.24'
classpath 'org.vafer:jdependency:1.1'
classpath files('gradle/plugins/shadowPlugin.jar')
}
}
plugins {
id 'java'
id 'de.undercouch.download' version '3.1.1'
}
apply plugin: com.github.jengelman.gradle.plugins.shadow.ShadowPlugin
tasks.withType(AbstractCompile) {
classpath += configurations.shadow
}
group 'protocolsupport'
version '0.01-dev'
sourceCompatibility = 1.8
import de.undercouch.gradle.tasks.download.Download
File dllibs = new File('dllibs')
dllibs.mkdirs()
File gen = new File('gen')
gen.deleteDir();
gen.mkdirs();
//TODO: Add ProtocolSupport to dlibs (Obviously we're in beta and cannot download yet so compilation will have to be done for now)
task updateLibs(type: Download) {
src([
'http://www.tcpr.ca/files/spigot/spigot-1.12.2-R0.1-SNAPSHOT-b1610.jar'
])
dest dllibs
onlyIfNewer true
overwrite true
}
compileJava.dependsOn(clean)
compileJava.dependsOn(updateLibs)
sourceSets {
main {
java {
srcDirs = ['src']
}
resources {
srcDirs = ['resources']
}
}
}
repositories {
mavenCentral()
}
dependencies {
shadow files(new File(dllibs, 'spigot-1.12.2-R0.1-SNAPSHOT-b1610.jar'), new File(dllibs, 'ProtocolSupport.jar'))
}
shadowJar {
doFirst {
new File(destinationDir, archiveName).delete()
}
from sourceSets.main.java.srcDirs
from 'LICENSE'
from gen
minimizeJar = true
destinationDir = file('target')
archiveName = 'ProtocolSupportPocketStuff.jar'
exclude 'META-INF/**'
}
jar.enabled = false
jar.finalizedBy(shadowJar)