Skip to content

Commit

Permalink
Change order of Gradle tasks. (#1961)
Browse files Browse the repository at this point in the history
The `clean` task is called after `compileKotlin`, and before `compileJava`,
causing the output of the Kotlin compilation to be wiped, and therefore not made
available to the Java compilation.

This commit re-orders tasks to get `clean` done before the other tasks for
`compileJava`.

This commit also verifies the presence of the `INSTALL4J_HOME` env var to avoid
compile issue when checking out the project the first time.
  • Loading branch information
tychobrailleur authored Nov 26, 2023
1 parent de1ddab commit 1e98868
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,11 @@ distributions {
}

install4j {
if (install4jHomeDir != null && install4jHomeDir != "") installDir = file(install4jHomeDir)
else installDir = file(System.getenv('INSTALL4J_HOME'))
if (install4jHomeDir != null && install4jHomeDir != "") {
installDir = file(install4jHomeDir)
} else if (System.getenv('INSTALL4J_HOME')) {
installDir = file(System.getenv('INSTALL4J_HOME')) as File
}
disableSigning = true
license = System.getenv('INSTALL4J_LICENSE')
}
Expand Down Expand Up @@ -283,7 +286,7 @@ task media(type: com.install4j.gradle.Install4jTask) {
variables = [HO_version: project.version, projectDir: projectDir, versionType: versionType]
}

task preparingBuild(dependsOn: clean) {
task preparingBuild {
group 'sub tasks'
doLast {
if (releaseArtefacts) {
Expand Down Expand Up @@ -484,6 +487,8 @@ markdownToHtml.dependsOn pushmd
poeditorPull.dependsOn markdownToHtml
createLanguageFileList.dependsOn poeditorPull
processResources.dependsOn createLanguageFileList
compileJava.dependsOn(clean)
compileJava.dependsOn processResources


// endregion ======================================================================================================================

0 comments on commit 1e98868

Please sign in to comment.