Skip to content

Commit

Permalink
Adopt build-scripts to Gradle changes
Browse files Browse the repository at this point in the history
  • Loading branch information
snazy committed Mar 3, 2025
1 parent 994e433 commit ff86d4d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 19 deletions.
24 changes: 7 additions & 17 deletions build-logic/src/main/kotlin/polaris-java.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -100,24 +100,14 @@ testing {
}
)
}
}
}
}

// Special handling for test-suites with type `manual-test`, which are intended to be run on demand
// rather than implicitly via `check`.
afterEvaluate {
testing {
suites {
withType<JvmTestSuite> {
// Need to do this check in an afterEvaluate, because the `withType` above gets called
// before the configure() of a registered test suite runs.
if (testType.get() != "manual-test") {
targets.all {
if (testTask.name != "test") {
testTask.configure { shouldRunAfter("test") }
tasks.named("check").configure { dependsOn(testTask) }
}
// Special handling for test-suites with names containing `manualtest`, which are intended to
// be run on demand rather than implicitly via `check`.
if (!name.lowercase().contains("manualtest")) {
targets.all {
if (testTask.name != "test") {
testTask.configure { shouldRunAfter("test") }
tasks.named("check").configure { dependsOn(testTask) }
}
}
}
Expand Down
2 changes: 0 additions & 2 deletions build-logic/src/main/kotlin/polaris-quarkus.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
* under the License.
*/

import org.gradle.api.attributes.TestSuiteType
import org.gradle.api.plugins.jvm.JvmTestSuite
import org.gradle.kotlin.dsl.register
import org.gradle.kotlin.dsl.withType
Expand All @@ -41,7 +40,6 @@ testing {
}
}
register<JvmTestSuite>("intTest") {
testType = TestSuiteType.INTEGRATION_TEST
targets.all {
tasks.named("compileIntTestJava").configure {
dependsOn(tasks.named("compileQuarkusTestGeneratedSourcesJava"))
Expand Down

0 comments on commit ff86d4d

Please sign in to comment.