diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2022-04-05 18:41:45 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2022-04-05 18:54:52 +0200 |
| commit | f2ff40b5170260289e99e0506525f0905f380907 (patch) | |
| tree | 27d5aff0bd6fec89f117f2bae44f6fe47473aa48 | |
| parent | 8571677460c2c2f856a870e6e9b47db82cd249ca (diff) | |
fix(web/ui): Add workaround for Quarkus Gradle build issues
This chnage add a workaround for the issues that appear when building
the Quarkus application due to it accessing the build files of the other
local modules.
| -rw-r--r-- | opendc-web/opendc-web-api/build.gradle.kts | 20 | ||||
| -rw-r--r-- | opendc-web/opendc-web-ui/build.gradle.kts | 2 |
2 files changed, 19 insertions, 3 deletions
diff --git a/opendc-web/opendc-web-api/build.gradle.kts b/opendc-web/opendc-web-api/build.gradle.kts index 497ac52a..ca01e0c8 100644 --- a/opendc-web/opendc-web-api/build.gradle.kts +++ b/opendc-web/opendc-web-api/build.gradle.kts @@ -79,16 +79,30 @@ tasks.quarkusDev { tasks.test { extensions.configure(JacocoTaskExtension::class) { excludeClassLoaders = listOf("*QuarkusClassLoader") - // destinationFile = layout.buildDirectory.file("jacoco-quarkus.exec").get().asFile } } /* Fix for Quarkus/ktlint-gradle incompatibilities */ -tasks.named("runKtlintCheckOverMainSourceSet").configure { +tasks.named("runKtlintCheckOverMainSourceSet") { mustRunAfter(tasks.quarkusGenerateCode) mustRunAfter(tasks.quarkusGenerateCodeDev) } -tasks.named("runKtlintCheckOverTestSourceSet").configure { +tasks.named("runKtlintCheckOverTestSourceSet") { mustRunAfter(tasks.quarkusGenerateCodeTests) } + +/* Fix for Quarkus/Gradle issues */ +tasks.quarkusGenerateCode { + mustRunAfter(projects.opendcWeb.opendcWebUiQuarkus.deployment) + mustRunAfter(projects.opendcWeb.opendcWebUi) + + doFirst { + mkdir("${projects.opendcWeb.opendcWebUi.dependencyProject.buildDir}/classes/java/main") + } +} + +tasks.quarkusGenerateCodeTests { + mustRunAfter(projects.opendcWeb.opendcWebUiQuarkus.deployment) + mustRunAfter(projects.opendcWeb.opendcWebUi) +} diff --git a/opendc-web/opendc-web-ui/build.gradle.kts b/opendc-web/opendc-web-ui/build.gradle.kts index 62d71897..9e0d4ff0 100644 --- a/opendc-web/opendc-web-ui/build.gradle.kts +++ b/opendc-web/opendc-web-ui/build.gradle.kts @@ -107,4 +107,6 @@ tasks.processResources { from(project.fileTree("public")) { into("META-INF/resources/${project.name}/static") } + + mkdir("${project.buildDir}/classes/java/main") } |
