Launcher/Launcher/build.gradle
2019-04-13 15:25:23 +03:00

58 lines
1.4 KiB
Groovy

apply plugin: 'com.github.johnrengelman.shadow'
String mainClassName = "ru.gravit.launcher.ClientLauncherWrapper"
String mainAgentName = "ru.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")
}
shadowJar {
classifier = null
relocate 'org.objectweb.asm', 'ru.gravit.repackage.org.objectweb.asm'
configurations = [project.configurations.pack]
exclude 'module-info.class'
}
dependencies {
pack project(':LauncherAPI') // Not error on obf.
bundle 'com.github.oshi:oshi-core:3.13.0'
bundle 'com.jfoenix:jfoenix:8.0.8'
bundle 'de.jensd:fontawesomefx:8.9'
bundle 'org.fusesource.jansi:jansi:1.17.1'
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