2019-04-12 23:22:24 +03:00
|
|
|
apply plugin: 'com.github.johnrengelman.shadow'
|
|
|
|
|
2019-06-02 05:03:08 +03:00
|
|
|
String mainClassName = "pro.gravit.launcher.ClientLauncherWrapper"
|
|
|
|
String mainAgentName = "pro.gravit.launcher.LauncherAgent"
|
2018-09-17 10:07:32 +03:00
|
|
|
|
|
|
|
repositories {
|
2019-04-03 16:27:40 +03:00
|
|
|
maven {
|
|
|
|
url "http://repo.spring.io/plugins-release/"
|
|
|
|
}
|
2018-09-17 10:07:32 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
sourceCompatibility = '1.8'
|
|
|
|
targetCompatibility = '1.8'
|
|
|
|
|
2019-01-09 12:42:36 +03:00
|
|
|
configurations {
|
2019-04-03 16:27:40 +03:00
|
|
|
bundle
|
|
|
|
pack
|
|
|
|
compile.extendsFrom bundle, pack
|
2019-01-09 12:42:36 +03:00
|
|
|
}
|
|
|
|
|
2018-09-17 10:07:32 +03:00
|
|
|
jar {
|
2019-04-12 23:22:24 +03:00
|
|
|
classifier = 'clean'
|
2019-04-03 16:27:40 +03:00
|
|
|
manifest.attributes("Main-Class": mainClassName,
|
|
|
|
"Premain-Class": mainAgentName,
|
|
|
|
"Can-Redefine-Classes": "true",
|
|
|
|
"Can-Retransform-Classes": "true",
|
2019-06-02 04:33:31 +03:00
|
|
|
"Can-Set-Native-Method-Prefix": "true",
|
|
|
|
"Multi-Release-Jar": "true")
|
2018-09-17 10:07:32 +03:00
|
|
|
}
|
|
|
|
|
2019-04-12 23:22:24 +03:00
|
|
|
shadowJar {
|
2019-05-15 14:11:22 +03:00
|
|
|
classifier = null
|
|
|
|
relocate 'org.objectweb.asm', 'ru.gravit.repackage.org.objectweb.asm'
|
|
|
|
relocate 'io.netty', 'ru.gravit.repackage.io.netty'
|
|
|
|
configurations = [project.configurations.pack]
|
|
|
|
exclude 'module-info.class'
|
2019-04-12 23:22:24 +03:00
|
|
|
}
|
|
|
|
|
2018-09-17 10:07:32 +03:00
|
|
|
dependencies {
|
2019-05-03 16:27:48 +03:00
|
|
|
pack project(':LauncherAuthlib')
|
2019-05-07 20:53:20 +03:00
|
|
|
bundle 'com.github.oshi:oshi-core:3.13.0'
|
2019-05-05 09:37:36 +03:00
|
|
|
bundle 'com.jfoenix:jfoenix:8.0.8'
|
2019-04-12 23:51:15 +03:00
|
|
|
bundle 'de.jensd:fontawesomefx:8.9'
|
2019-05-05 09:37:36 +03:00
|
|
|
bundle 'org.apache.httpcomponents:httpclient:4.5.7'
|
2019-05-31 01:51:02 +03:00
|
|
|
pack 'io.netty:netty-codec-http:4.1.36.Final'
|
2019-04-12 23:22:24 +03:00
|
|
|
pack 'org.ow2.asm:asm-tree:7.1'
|
2018-09-17 10:07:32 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
task genRuntimeJS(type: Zip) {
|
2019-04-03 16:27:40 +03:00
|
|
|
archiveName = "runtime.zip"
|
|
|
|
destinationDir = file("${buildDir}/tmp")
|
|
|
|
from "runtime/"
|
2019-01-09 11:29:54 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
task dumpLibs(type: Copy) {
|
2019-04-03 16:27:40 +03:00
|
|
|
into "$buildDir/libs/libraries"
|
|
|
|
from configurations.bundle
|
2018-09-17 10:07:32 +03:00
|
|
|
}
|
|
|
|
|
2019-01-09 11:29:54 +03:00
|
|
|
|
2019-04-12 23:22:24 +03:00
|
|
|
build.dependsOn tasks.genRuntimeJS, tasks.dumpLibs, tasks.shadowJar
|