This message was deleted.
# community-support
s
This message was deleted.
e
the default test suite includes the projects
implementation
dependencies
v
Because it makes sense for unit tests. But why should you want that for integration tests? But anyway, by default it is just the usual. When you depend on something, you only get its
api
dependencies in your compile classpath. If you want it differently, you have to configure it differently. For the default test suite the
java
plugin configures the configurations accordingly, for example so that
testImplementation
extends from
implementation
and thus gets all the same dependencies, and the same for
testRuntimeOnly
and
runtimeOnly
. Regarding version catalog bundles, it would be
implementation.bundle(libs.bundles.test-stuff)
.
e
thanks, ill give it a try. Wish the project was clean so i only would need api dependensies for the integration test. Not sure how to make it extend the excample from the doc im working whit is this
Copy code
testing {
    suites {
        val integrationTest by registering(JvmTestSuite::class) {
            dependencies {
                implementation(project()) 
            }
        }
    }
}

dependensies {
 api(...
 implementation(...
 testImplementation(...
}
looks like this could be working
Copy code
project.configurations.getByName("implementation").dependencies.forEach { dependency ->
        implementation(dependency)
    }
v
No, especially for things added later, just extend it, as I said
configurations.named("integTestImplementation") { extendsFrom(configurations.implementation.get()) }
or something like that.
e
Thanks
That worked 🙂 Did not realize the test suit plugin added it's configuration to the project
v
It defines a source set, the Java plugins add the configurations accordingly for each and every source set.