In order to get rid of ```Warning: Kotest autoscan...
# kotest
s
In order to get rid of
Copy code
Warning: Kotest autoscan is enabled. This means Kotest will scan the classpath for extensions that are annotated with @AutoScan. To avoid this startup cost, set autoscan to false by setting the system property 'kotest.framework.classpath.scanning.config.disable=true'. For further details see <https://kotest.io/docs/next/framework/project-config.html#runtime-detection>
I'm setting
Copy code
tasks.withType<Test>().configureEach {
    systemProperties = mapOf(
        "kotest.framework.classpath.scanning.config.disable" to "true"
    )
}
in my Gradle build file, but I'm still seeing the message.Am I correct to assume that this should work?
Also setting
Copy code
systemProp.kotest.framework.classpath.scanning.config.disable=true
systemProp.kotest.framework.config.fqn=org.ossreviewtoolkit.utils.test.ProjectConfig
in
gradle.properties
seems to have no effect.
And either does setting
-Dkotest.framework.classpath.scanning.config.disable=true -Dkotest.framework.config.fqn=org.ossreviewtoolkit.utils.test.ProjectConfig
in the INtelliJ IDEA run configuration.
a
See this link: https://kotest.io/docs/intellij/intellij-properties.html Try adding a separate runtime properties file at
/resources/kotest.properties
. The
resources
dir should be a sibling of your
kotlin
dir. Content:
Copy code
kotest.framework.classpath.scanning.autoscan.disable=true
kotest.framework.classpath.scanning.config.disable=true
kotest.framework.config.fqn=com.example.ProjectConfig
s
Using
kotest.properties
doesn't work for me either. And actually, setting the properties on the
Test
tasks should work even if Gradle is not the test runner, I believe. Weird.
844 Views