Skip to content

Commit

Permalink
Introduce integrationTest sourceSet
Browse files Browse the repository at this point in the history
Signed-off-by: Taeik Lim <[email protected]>
  • Loading branch information
acktsap committed Feb 19, 2024
1 parent 1a651f2 commit 02362f1
Showing 1 changed file with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,19 @@ tasks.compileJava {
options.encoding = "UTF-8"
}

sourceSets {
create("integrationTest") {
compileClasspath += sourceSets.main.get().output
runtimeClasspath += sourceSets.main.get().output
}
}
val integrationTestImplementation: Configuration by configurations.getting {
extendsFrom(configurations.implementation.get(), configurations.testImplementation.get())
}
val integrationTestRuntimeOnly: Configuration by configurations.getting {
extendsFrom(configurations.runtimeOnly.get(), configurations.testRuntimeOnly.get())
}

tasks.withType<Checkstyle>().configureEach {
reports {
configFile = file("${project.rootDir}/buildSrc/config/naver-checkstyle-rules.xml")
Expand All @@ -44,3 +57,14 @@ tasks.named<Test>("test") {
useJUnitPlatform()
maxParallelForks = Runtime.getRuntime().availableProcessors()
}

tasks.register<Test>("integrationTest") {
// run after 'test' task
shouldRunAfter("test")

useJUnitPlatform()
maxParallelForks = Runtime.getRuntime().availableProcessors()

testClassesDirs = sourceSets["integrationTest"].output.classesDirs
classpath = sourceSets["integrationTest"].runtimeClasspath
}

0 comments on commit 02362f1

Please sign in to comment.