mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-04-11 18:57:30 +03:00
[FIX] ASM bundling.
This commit is contained in:
parent
76a9c07a48
commit
1503fa18e3
3 changed files with 18 additions and 4 deletions
|
@ -30,7 +30,8 @@
|
||||||
jar {
|
jar {
|
||||||
dependsOn parent.childProjects.Launcher.tasks.build
|
dependsOn parent.childProjects.Launcher.tasks.build
|
||||||
from { configurations.pack.collect { it.isDirectory() ? it : zipTree(it) } }
|
from { configurations.pack.collect { it.isDirectory() ? it : zipTree(it) } }
|
||||||
from(parent.childProjects.Launcher.tasks.jar.archivePath, parent.childProjects.Launcher.tasks.genRuntimeJS.archivePath)
|
from(parent.childProjects.Launcher.tasks.shadowJar.archivePath)
|
||||||
|
from(parent.childProjects.Launcher.tasks.genRuntimeJS.archivePath)
|
||||||
manifest.attributes("Main-Class": mainClassName,
|
manifest.attributes("Main-Class": mainClassName,
|
||||||
"Premain-Class": mainAgentName,
|
"Premain-Class": mainAgentName,
|
||||||
"Can-Redefine-Classes": "true",
|
"Can-Redefine-Classes": "true",
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
apply plugin: 'com.github.johnrengelman.shadow'
|
||||||
|
|
||||||
String mainClassName = "ru.gravit.launcher.ClientLauncherWrapper"
|
String mainClassName = "ru.gravit.launcher.ClientLauncherWrapper"
|
||||||
String mainAgentName = "ru.gravit.launcher.LauncherAgent"
|
String mainAgentName = "ru.gravit.launcher.LauncherAgent"
|
||||||
|
|
||||||
|
@ -17,7 +19,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
from { configurations.pack.collect { it.isDirectory() ? it : zipTree(it) } }
|
classifier = 'clean'
|
||||||
manifest.attributes("Main-Class": mainClassName,
|
manifest.attributes("Main-Class": mainClassName,
|
||||||
"Premain-Class": mainAgentName,
|
"Premain-Class": mainAgentName,
|
||||||
"Can-Redefine-Classes": "true",
|
"Can-Redefine-Classes": "true",
|
||||||
|
@ -25,10 +27,17 @@
|
||||||
"Can-Set-Native-Method-Prefix": "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 {
|
dependencies {
|
||||||
pack project(':LauncherAPI') // Not error on obf.
|
pack project(':LauncherAPI') // Not error on obf.
|
||||||
bundle 'com.github.oshi:oshi-core:3.13.0'
|
bundle 'com.github.oshi:oshi-core:3.13.0'
|
||||||
compileOnly 'org.ow2.asm:asm-all:5.0.3'
|
pack 'org.ow2.asm:asm-tree:7.1'
|
||||||
}
|
}
|
||||||
|
|
||||||
task genRuntimeJS(type: Zip) {
|
task genRuntimeJS(type: Zip) {
|
||||||
|
@ -43,4 +52,4 @@ task dumpLibs(type: Copy) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
build.dependsOn tasks.genRuntimeJS, tasks.dumpLibs
|
build.dependsOn tasks.genRuntimeJS, tasks.dumpLibs, tasks.shadowJar
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
plugins {
|
||||||
|
id 'com.github.johnrengelman.shadow' version '5.0.0' apply false
|
||||||
|
}
|
||||||
|
|
||||||
configure(subprojects.findAll { it.name != 'modules' && it.name != 'Radon' }) {
|
configure(subprojects.findAll { it.name != 'modules' && it.name != 'Radon' }) {
|
||||||
apply plugin: 'idea'
|
apply plugin: 'idea'
|
||||||
apply plugin: 'eclipse'
|
apply plugin: 'eclipse'
|
||||||
|
|
Loading…
Reference in a new issue