summaryrefslogtreecommitdiff
path: root/opendc-web
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2022-04-22 09:56:35 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2022-04-22 09:56:35 +0200
commitf5d631b474567c87bcd41f8567ba66fda2a83050 (patch)
tree302913ed479cfb05a9581d4b6eed356aec1fd718 /opendc-web
parent6d7f683a2c1b1823c8cf99e304a1f569eaaff76a (diff)
build(web/api): Move Quarkus build configuration into buildSrc
This change moves most of the Quarkus build configuration into buildSrc so it can possibly be re-used for other modules.
Diffstat (limited to 'opendc-web')
-rw-r--r--opendc-web/opendc-web-api/build.gradle.kts54
1 files changed, 1 insertions, 53 deletions
diff --git a/opendc-web/opendc-web-api/build.gradle.kts b/opendc-web/opendc-web-api/build.gradle.kts
index 503e0a5b..5ef6009f 100644
--- a/opendc-web/opendc-web-api/build.gradle.kts
+++ b/opendc-web/opendc-web-api/build.gradle.kts
@@ -24,11 +24,7 @@ description = "REST API for the OpenDC website"
/* Build configuration */
plugins {
- `kotlin-conventions`
- kotlin("plugin.allopen")
- kotlin("plugin.jpa")
- `testing-conventions`
- id("io.quarkus")
+ `quarkus-conventions`
}
dependencies {
@@ -60,51 +56,3 @@ dependencies {
testImplementation(libs.quarkus.test.security)
testImplementation(libs.quarkus.jdbc.h2)
}
-
-allOpen {
- annotation("javax.ws.rs.Path")
- annotation("javax.enterprise.context.ApplicationScoped")
- annotation("io.quarkus.test.junit.QuarkusTest")
- annotation("javax.persistence.Entity")
-}
-
-tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
- kotlinOptions.javaParameters = true
-}
-
-tasks.quarkusDev {
- workingDir = rootProject.projectDir.toString()
-}
-
-/* Make sure the jacoco-report-aggregation plugin picks up the Quarkus coverage data */
-configurations.create("coverageDataElementsForQuarkus") {
- isVisible = false
- isCanBeResolved = false
- isCanBeConsumed = true
-
- extendsFrom(configurations["implementation"], configurations["runtimeOnly"])
-
- @Suppress("UnstableApiUsage")
- attributes {
- attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category::class.java, Category.VERIFICATION))
- attribute(VerificationType.VERIFICATION_TYPE_ATTRIBUTE, objects.named(VerificationType::class.java, VerificationType.JACOCO_RESULTS))
- }
-
- artifacts {
- add("coverageDataElementsForQuarkus", layout.buildDirectory.file("jacoco-quarkus.exec")) {
- @Suppress("UnstableApiUsage")
- type = ArtifactTypeDefinition.BINARY_DATA_TYPE
- builtBy(tasks.test)
- }
- }
-}
-
-/* Fix for Quarkus/ktlint-gradle incompatibilities */
-tasks.named("runKtlintCheckOverMainSourceSet") {
- mustRunAfter(tasks.quarkusGenerateCode)
- mustRunAfter(tasks.quarkusGenerateCodeDev)
-}
-
-tasks.named("runKtlintCheckOverTestSourceSet") {
- mustRunAfter(tasks.quarkusGenerateCodeTests)
-}