forked from burdoto/JumpCube
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjar.gradle
32 lines (26 loc) · 1012 Bytes
/
jar.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
task buildPlugin(type: Copy, dependsOn: 'shadowJar') {
from shadowJar.outputs.files.singleFile
def target = file("$buildDir/plugin")
into target
rename { String filename -> return pluginJarName }
System.out.printf("Building plugin into: %s/%s\n", target.getAbsolutePath(), pluginJarName)
}
task testPlugin(type: Copy, dependsOn: ['deleteTestPlugin', 'buildPlugin']) {
System.out.println("Test Server Directory: $testServerDir")
System.out.println("Test Plugin Target File: $testServerDir\\plugins\\$pluginJarName")
from buildPlugin.outputs.files.singleFile
into file("$testServerDir/plugins/")
}
task deleteTestPlugin(type: Delete) {
outputs.upToDateWhen { !file("$testServerDir/plugins/$pluginJarName").exists() }
delete "$testServerDir/plugins/$pluginJarName"
}
compileJava {
options.encoding = "UTF-8"
}
processResources {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
from(sourceSets.main.resources) {
expand project.properties
}
}