Kotlin internal
visibility is scoped to the "module" including the helpful statement that it may be:
a Gradle source set (with the exception that the test source set can access the internal declarations of main)
... so you can unit-test internal methods.
My Gradle build holds performance tests in a sub-project. How can I make those also "see" internal items of the parent?
The standard import doesn't do this
dependencies {
compile project(':myParentName')`
}
If it's impossible from a sub-project, how can a custom source-set (i.e. not test
) in the main project have the same exception?
PS. It is quite common to see JMH performance tests put into a sub-project to keep configuration from polluting from the main build.gradle
. This doesnt mean they are only tests of public interfaces (see the M
in JMH).