forked from Conquest-Reforged/WorldConverter
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
48 lines (40 loc) · 1.27 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
apply plugin: "java"
group = "me.dags"
version = "2.0.0"
allprojects {
apply plugin: "java"
group = rootProject.group
version = rootProject.version
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
task coreClasses(type: Copy, dependsOn: subprojects.tasks["build"]) {
includeEmptyDirs = false
from { zipTree(project(":ConverterCore").tasks.withType(Jar).last().archivePath) }
include("**/*.class")
into { file("$buildDir/classes/java/main") }
}
task coreResources(type: Copy, dependsOn: subprojects.tasks["build"]) {
includeEmptyDirs = false
from { zipTree(project(":ConverterCore").tasks.withType(Jar).last().archivePath) }
exclude("**/*.class")
into { file("$buildDir/resources/main") }
}
task modJars(type: Copy, dependsOn: subprojects.tasks["build"]) {
from {
subprojects.collect {
if (it.name == "ConverterCore") {
return [].asList()
} else {
return it.tasks.withType(Jar).matching { !it.toString().contains("deobf") }.collect { it.archivePath }
}
}
}
into { file("$buildDir/resources/main/mods") }
}
jar {
dependsOn(coreClasses, coreResources, modJars)
manifest {
attributes("Main-Class": "me.dags.converter.Main")
}
}