Launcher/Launcher/build.gradle

62 lines
1.5 KiB
Groovy
Raw Normal View History

apply plugin: 'com.github.johnrengelman.shadow'
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 {
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",
"Can-Set-Native-Method-Prefix": "true",
"Multi-Release-Jar": "true")
2018-09-17 10:07:32 +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'
}
2018-09-17 10:07:32 +03:00
dependencies {
pack project(':LauncherAuthlib')
bundle 'com.github.oshi:oshi-core:3.13.0'
2019-05-05 09:37:36 +03:00
bundle 'com.jfoenix:jfoenix:8.0.8'
bundle 'de.jensd:fontawesomefx:8.9'
2019-05-05 09:37:36 +03:00
bundle 'org.apache.httpcomponents:httpclient:4.5.7'
pack 'io.netty:netty-codec-http:4.1.36.Final'
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
build.dependsOn tasks.genRuntimeJS, tasks.dumpLibs, tasks.shadowJar