subprojects { sourceSets { create("integrationTest") { compileClasspath += sourceSets.main.get().output runtimeClasspath += sourceSets.main.get().output } } configurations.getByName("integrationTestImplementation") { extendsFrom(configurations.implementation.get()) } configurations.getByName("integrationTestRuntimeOnly") { extendsFrom(configurations.runtimeOnly.get()) } val integrationTest = task("integrationTest") { maxHeapSize = "2G" description = "Runs integration tests." group = "verification" testClassesDirs = sourceSets["integrationTest"].output.classesDirs classpath = sourceSets["integrationTest"].runtimeClasspath useJUnit() } tasks.check { dependsOn(integrationTest) } }