dependency-analysis-gradle-plugin
dependency-analysis-gradle-plugin copied to clipboard
Support custom source sets (source sets other than "main" and "test")
Hello, in project we have integration tests specified by:
configure(integrationTests()) {
sourceSets {
create(integrationTest) {
withConvention(org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet::class) {
kotlin.srcDir("src/integrationTest/kotlin")
resources.srcDir("src/integrationTest/resources")
compileClasspath += sourceSets["main"].output + configurations["testRuntimeClasspath"]
runtimeClasspath += output + compileClasspath + sourceSets["test"].runtimeClasspath
}
}
}
task<Test>(integrationTest) {
description = "Runs the integration tests"
group = "verification"
testClassesDirs = sourceSets[integrationTest].output.classesDirs
classpath = sourceSets[integrationTest].runtimeClasspath
mustRunAfter(tasks["test"])
useJUnitPlatform()
}
}
in one of subprojects i have only integration test(no unit) and plugin suggest me to remove all testImplementation libraries that i'm using there, can i somehow specify custom source set for it or somehow specify that dependency analysis should consume compileIntegrationTestKotlin and compileIntegrationTestJava tasks?
The plugin currently provides no support for custom source sets. It only supports main
and test
. I'll consider this a feature request for a future release.
This should work now with v1.19.0
. (There might be more improvements with #854.)
Happy about feedback though.
I'm going to preemptively close this in the expectation that it works as desired. Feel free to reopen if you see issues!