Javier
01/10/2023, 12:21 PMtest/kotlin
is green, meanwhile functionalTest/kotlin
is blue.Starr
01/10/2023, 12:26 PMfunctionalTest
source set? idk if IJ detects whether it depends on test
or whatever
you can use Mark As > Test Sources
in the UI but that wouldn't persistRiccardo Lippolis
01/10/2023, 12:28 PMintegrationTest
directory (from the sourceset integrationTestSourceSet
) as test sources, by using the idea
plugin:
plugins {
// ... other plugins
idea
}
idea {
module {
testSources.from(integrationTestSourceSet.allSource.sourceDirectories)
}
}
Javier
01/10/2023, 12:36 PMsourceSets.register("functionalTest")
Javier
01/10/2023, 12:36 PMRiccardo Lippolis
01/10/2023, 12:38 PMidea
plugin is suitable for that. So if you want to keep the Gradle file independent from IntelliJ-specific stuff, that's not an option 😅Emil Kantis
01/10/2023, 12:46 PMJavier
01/10/2023, 12:47 PMEmil Kantis
01/10/2023, 12:48 PMJavier
01/10/2023, 12:48 PMtest
, I would expect something similar for other regex like fooTest
or testFoo
Riccardo Lippolis
01/10/2023, 12:52 PMJavier
01/10/2023, 1:05 PMRiccardo Lippolis
01/10/2023, 1:07 PMidea
pluginJavier
01/10/2023, 1:08 PMJavier
01/10/2023, 1:09 PMmain
tooRiccardo Lippolis
01/10/2023, 1:42 PMfunctionalTest/kotlin
directory shown as a test sources dir in IntelliJ (make it green). So I suggested the idea
plugin. So then you asked if it was possible without the plugin, so I sent you the link to the IDEA documentation describing a way that would not involve the plugin, something like this:
sourceSets {
test {
kotlin {
srcDirs("src/test/kotlin", "src/functionalTest/kotlin")
}
}
}
you then said "yeah I could use this one, but I would have to do that on each project", which is the point where I lost you (and you lost me as well, probably) 😛