未验证 提交 46b07863 编写于 作者: S Skylot

build: fix bundle build

上级 445e91e6
......@@ -135,6 +135,16 @@ task copyExe(type: Copy) {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
task distWinBundle(type: Copy, dependsOn: 'jadx-gui:distWinWithJre') {
group 'jadx'
description = 'Copy bundle to build dir'
destinationDir buildDir
from(tasks.getByPath('jadx-gui:distWinWithJre').outputs) {
include '*.zip'
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
task dist {
group 'jadx'
description = 'Build jadx distribution zip'
......@@ -143,18 +153,13 @@ task dist {
OperatingSystem os = org.gradle.nativeplatform.platform.internal.DefaultNativePlatform.currentOperatingSystem;
if (os.isWindows()) {
dependsOn('copyExe')
}
}
task distWin(type: Copy, dependsOn: 'jadx-gui:distWinWithJre') {
group 'jadx'
description = 'Copy bundle to build dir'
destinationDir buildDir
from(tasks.getByPath('jadx-gui:distWinWithJre').outputs) {
include '*.zip'
if (project.hasProperty("bundleJRE")) {
println("Build win bundle with JRE")
dependsOn('distWinBundle')
} else {
dependsOn('copyExe')
}
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
task cleanBuildDir(type: Delete) {
......
......@@ -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);
......
......@@ -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
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册