forked from GravitLauncher/LauncherModules
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
56 lines (47 loc) · 1.38 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
task bundleZip(type: Zip) {
archiveFileName = 'modules.zip'
destinationDirectory = file("$buildDir")
}
if (!project.tasks.findByName('assemble')) {
task assemble {
}
}
if (!project.tasks.findByName('build')) {
task build {
}
}
subprojects {
apply plugin: 'com.github.johnrengelman.shadow'
shadowJar {
duplicatesStrategy = 'EXCLUDE'
classifier = null
configurations = [project.configurations.runtimeClasspath]
exclude 'module-info.class'
}
parent.tasks.bundleZip.dependsOn tasks.shadowJar
parent.tasks.bundleZip.from tasks.shadowJar
}
configure(subprojects.findAll { it.name.endsWith('_module') }) {
dependencies {
compileOnly project(':LaunchServer')
}
}
configure(subprojects.findAll { it.name.endsWith('_swmodule') }) {
dependencies {
compileOnly project(':ServerWrapper')
}
shadowJar {
relocate 'io.netty', 'pro.gravit.repackage.io.netty'
}
}
configure(subprojects.findAll { it.name.endsWith('_lmodule') }) {
dependencies {
compileOnly project(':Launcher')
}
shadowJar {
relocate 'org.objectweb.asm', 'pro.gravit.repackage.org.objectweb.asm'
relocate 'io.netty', 'pro.gravit.repackage.io.netty'
}
}
project.tasks.findByName('assemble').dependsOn tasks.bundleZip
project.tasks.findByName('build').dependsOn project.tasks.findByName('assemble')