Launcher/Launcher/build.gradle

60 lines
1.5 KiB
Groovy

apply plugin: 'com.github.johnrengelman.shadow'
String mainClassName = "pro.gravit.launcher.ClientLauncherWrapper"
String mainAgentName = "pro.gravit.launcher.LauncherAgent"
repositories {
maven {
url "http://repo.spring.io/plugins-release/"
}
}
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
configurations {
bundle
pack
compile.extendsFrom bundle, pack
}
jar {
classifier = 'clean'
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")
}
shadowJar {
classifier = null
relocate 'org.objectweb.asm', 'pro.gravit.repackage.org.objectweb.asm'
relocate 'io.netty', 'pro.gravit.repackage.io.netty'
configurations = [project.configurations.pack]
exclude 'module-info.class'
}
dependencies {
pack project(':LauncherAuthlib')
bundle 'com.github.oshi:oshi-core:3.13.0'
bundle 'de.jensd:fontawesomefx:8.9'
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'
}
task genRuntimeJS(type: Zip) {
archiveName = "runtime.zip"
destinationDir = file("${buildDir}/tmp")
from "runtime/"
}
task dumpLibs(type: Copy) {
into "$buildDir/libs/libraries"
from configurations.bundle
}
build.dependsOn tasks.genRuntimeJS, tasks.dumpLibs, tasks.shadowJar