From 8b1d254d157281fccf6f5d2b4bdb7017469bee64 Mon Sep 17 00:00:00 2001 From: Thijs Koppen Date: Sat, 6 Jan 2024 16:08:03 +0100 Subject: [PATCH] Fix 'gradlew build' --- .github/workflows/test.yaml | 2 +- build.gradle.kts | 11 ++++------- examples/build.gradle.kts | 4 ++-- .../{test => main}/resources/application.properties | 5 +++-- examples/src/{test => main}/resources/import.sql | 0 5 files changed, 10 insertions(+), 12 deletions(-) rename examples/src/{test => main}/resources/application.properties (88%) rename examples/src/{test => main}/resources/import.sql (100%) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index b154fdd..5c36a76 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -23,4 +23,4 @@ jobs: env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - run: ./gradlew test sonar --no-daemon --continue --info + run: ./gradlew test jacocoTestReport sonar --no-daemon --continue --info diff --git a/build.gradle.kts b/build.gradle.kts index 854a033..7f27ea1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright 2023 Thijs Koppen + * Copyright 2023-2024 Thijs Koppen * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,18 +43,15 @@ configure(subprojects) { testImplementation("io.mockk:mockk:$mockkVersion") } + tasks.test { + useJUnitPlatform() + } tasks.jacocoTestReport { - dependsOn(tasks.test) - finalizedBy(tasks.jacocoTestCoverageVerification) reports { html.required = true xml.required = true } } - tasks.test { - useJUnitPlatform() - finalizedBy(tasks.jacocoTestReport) - } kotlin { jvmToolchain(11) diff --git a/examples/build.gradle.kts b/examples/build.gradle.kts index 727153c..41e2070 100644 --- a/examples/build.gradle.kts +++ b/examples/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright 2023 Thijs Koppen + * Copyright 2023-2024 Thijs Koppen * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ plugins { dependencies { implementation(project(":library")) ksp(project(":library")) - testImplementation("io.quarkus:quarkus-jdbc-h2") + implementation("io.quarkus:quarkus-jdbc-h2") } allOpen { diff --git a/examples/src/test/resources/application.properties b/examples/src/main/resources/application.properties similarity index 88% rename from examples/src/test/resources/application.properties rename to examples/src/main/resources/application.properties index 18f81fd..777ebc7 100644 --- a/examples/src/test/resources/application.properties +++ b/examples/src/main/resources/application.properties @@ -1,5 +1,5 @@ # -# Copyright 2023 Thijs Koppen +# Copyright 2023-2024 Thijs Koppen # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,8 +14,9 @@ # limitations under the License. # -quarkus.datasource.db-kind=h2 quarkus.datasource.jdbc.url=jdbc:h2:mem:test +quarkus.datasource.username=sa +quarkus.datasource.password= quarkus.hibernate-orm.database.generation=drop-and-create quarkus.hibernate-orm.packages=ch.icken.model diff --git a/examples/src/test/resources/import.sql b/examples/src/main/resources/import.sql similarity index 100% rename from examples/src/test/resources/import.sql rename to examples/src/main/resources/import.sql