Skip to content

Commit

Permalink
Get test-sets/integrationTest task working again
Browse files Browse the repository at this point in the history
Plugin config not working in `subprojects` block: unbroken-dome/gradle-testsets-plugin#109 (comment)
So applying it in the subproject `build.gradle.kts`... means duplicate
code if there's more than 1 subproject...

There are other ways to register `integrationTest` task: https://stackoverflow.com/questions/52904603/integration-tests-with-gradle-kotlin-dsl
But it's a lot more code, and none of them add `jacoco` for free.
  • Loading branch information
will-molloy committed Jul 1, 2023
1 parent d5156fa commit e4ee4b0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ template repository for Java projects using Gradle
- Automatic code formatting via [Spotless](https://github.com/diffplug/spotless)
- Code style analysis via [Checkstyle](https://github.com/checkstyle/checkstyle)
- Static analysis via [SpotBugs](https://spotbugs.github.io/)
- Unit and integration test support via JUnit 5 and [TestSets plugin](https://github.com/unbroken-dome/gradle-testsets-plugin)
- Unit and integration test support via [JUnit 5](https://junit.org/junit5/) and [TestSets plugin](https://github.com/unbroken-dome/gradle-testsets-plugin)
- Code coverage reporting via [Codecov](https://codecov.io/)
- Dependency upgrades via [Renovate bot](https://renovatebot.com)

Expand Down
4 changes: 0 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ plugins {
id("com.diffplug.gradle.spotless") version "6.19.0" apply (false)
id("com.github.spotbugs") version "5.0.14" apply (false)
id("com.asarkar.gradle.build-time-tracker") version "4.3.0"
id("org.unbroken-dome.test-sets") version "4.0.0" apply (false)
}

allprojects {
Expand Down Expand Up @@ -102,9 +101,6 @@ subprojects {
}
}

// Integration test support
// TODO test-set plugin

dependencies {
val log4jVersion = "2.20.0"
val guavaVersion = "32.0.1-jre"
Expand Down
5 changes: 5 additions & 0 deletions hello-world/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
plugins {
id("org.unbroken-dome.test-sets") version "4.0.0"
}

testSets { create("integrationTest") }

0 comments on commit e4ee4b0

Please sign in to comment.