Skip to content

Commit

Permalink
chore(build): fix gradle tasks dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
skylot committed Apr 20, 2023
1 parent b763402 commit e577873
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ stages:
java-11:
stage: test
image: eclipse-temurin:11
script: ./gradlew clean build dist
script: ./gradlew clean build dist copyExe

java-17:
stage: test
image: eclipse-temurin:17
script: ./gradlew clean build dist
script: ./gradlew clean build dist copyExe
6 changes: 5 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,10 @@ task pack(type: Zip) {
task copyExe(type: Copy) {
group 'jadx'
description = 'Copy exe to build dir'
mustRunAfter pack // not needed, but gradle throws warning because of same output dir

// next task dependencies not needed, but gradle throws warning because of same output dir
mustRunAfter jar
mustRunAfter pack

from tasks.getByPath('jadx-gui:createExe')
include '*.exe'
Expand All @@ -139,6 +142,7 @@ task copyExe(type: Copy) {
task distWinBundle(type: Copy, dependsOn: 'jadx-gui:distWinWithJre') {
group 'jadx'
description = 'Copy bundle to build dir'
mustRunAfter pack
destinationDir buildDir
from(tasks.getByPath('jadx-gui:distWinWithJre').outputs) {
include '*.zip'
Expand Down
3 changes: 2 additions & 1 deletion jadx-gui/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ startScripts {

launch4j {
mainClassName = application.mainClass.get()
copyConfigurable = project.tasks.shadowJar.outputs.files
copyConfigurable = []
jarTask = project.tasks.shadowJar
icon = "${projectDir}/src/main/resources/logos/jadx-logo.ico"
outfile = "jadx-gui-${version}.exe"
Expand All @@ -116,6 +116,7 @@ launch4j {
downloadUrl = 'https://www.oracle.com/java/technologies/downloads/#jdk17-windows'
bundledJrePath = project.hasProperty("bundleJRE") ? '%EXEDIR%/jre' : '%JAVA_HOME%'
}
createExe.dependsOn(jar)

runtime {
addOptions('--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages')
Expand Down

0 comments on commit e577873

Please sign in to comment.