build: fix bundle build
This commit is contained in:
+18
-13
@@ -135,19 +135,7 @@ task copyExe(type: Copy) {
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
}
|
||||
|
||||
task dist {
|
||||
group 'jadx'
|
||||
description = 'Build jadx distribution zip'
|
||||
|
||||
dependsOn(pack)
|
||||
|
||||
OperatingSystem os = org.gradle.nativeplatform.platform.internal.DefaultNativePlatform.currentOperatingSystem;
|
||||
if (os.isWindows()) {
|
||||
dependsOn('copyExe')
|
||||
}
|
||||
}
|
||||
|
||||
task distWin(type: Copy, dependsOn: 'jadx-gui:distWinWithJre') {
|
||||
task distWinBundle(type: Copy, dependsOn: 'jadx-gui:distWinWithJre') {
|
||||
group 'jadx'
|
||||
description = 'Copy bundle to build dir'
|
||||
destinationDir buildDir
|
||||
@@ -157,6 +145,23 @@ task distWin(type: Copy, dependsOn: 'jadx-gui:distWinWithJre') {
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
}
|
||||
|
||||
task dist {
|
||||
group 'jadx'
|
||||
description = 'Build jadx distribution zip'
|
||||
|
||||
dependsOn(pack)
|
||||
|
||||
OperatingSystem os = org.gradle.nativeplatform.platform.internal.DefaultNativePlatform.currentOperatingSystem;
|
||||
if (os.isWindows()) {
|
||||
if (project.hasProperty("bundleJRE")) {
|
||||
println("Build win bundle with JRE")
|
||||
dependsOn('distWinBundle')
|
||||
} else {
|
||||
dependsOn('copyExe')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task cleanBuildDir(type: Delete) {
|
||||
group 'jadx'
|
||||
delete buildDir
|
||||
|
||||
@@ -129,7 +129,7 @@ public class SignatureProcessor extends AbstractVisitor {
|
||||
if (checkedArgTypes == null) {
|
||||
return false;
|
||||
}
|
||||
mth.updateTypes(Utils.lockList(checkedArgTypes), retType);
|
||||
mth.updateTypes(Collections.unmodifiableList(checkedArgTypes), retType);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
mth.addWarnComment("Type validation failed for signature: " + sp.getSignature(), e);
|
||||
|
||||
+2
-17
@@ -89,7 +89,7 @@ launch4j {
|
||||
maxHeapSize = 4096
|
||||
maxHeapPercent = 70
|
||||
downloadUrl = 'https://www.oracle.com/java/technologies/downloads/#jdk17-windows'
|
||||
bundledJrePath = '%JAVA_HOME%'
|
||||
bundledJrePath = project.hasProperty("bundleJRE") ? '%EXEDIR%/jre' : '%JAVA_HOME%'
|
||||
}
|
||||
|
||||
runtime {
|
||||
@@ -110,19 +110,7 @@ runtime {
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register('distLaunch4jConfig') {
|
||||
def configFile = layout.buildDirectory.file("jadx-gui-${version}.l4j.ini")
|
||||
outputs.file(configFile).withPropertyName('outputFiles')
|
||||
|
||||
doLast {
|
||||
configFile.get().getAsFile().write("""
|
||||
# Launch4j runtime config
|
||||
-DJAVA_HOME="%EXEDIR%/jre"
|
||||
""".trim())
|
||||
}
|
||||
}
|
||||
|
||||
task distWinWithJre(type: Zip, dependsOn: ['runtime', 'createExe', 'distLaunch4jConfig']) {
|
||||
task distWinWithJre(type: Zip, dependsOn: ['runtime', 'createExe']) {
|
||||
group 'jadx'
|
||||
destinationDirectory = buildDir
|
||||
archiveFileName = "jadx-gui-${jadxVersion}-with-jre-win.zip"
|
||||
@@ -133,8 +121,5 @@ task distWinWithJre(type: Zip, dependsOn: ['runtime', 'createExe', 'distLaunch4j
|
||||
from(createExe.outputs) {
|
||||
include '*.exe'
|
||||
}
|
||||
from(distLaunch4jConfig.outputs) {
|
||||
include '*.ini'
|
||||
}
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user