I noticed that there's no built in way to copy tes...
# gradle
r
I noticed that there's no built in way to copy test resources from one submodule to a submodule that depends on it. What is the recommended way to include this file:
core/src/test/resources/logback-test.xml
? To the relevant build directory of all of these submodules that depend on the core module:
Copy code
submodule1/build/resources/test
submodule2/build/resources/test
...
v
Sounds like you are after the java test fixtures plugin: https://docs.gradle.org/current/userguide/java_testing.html#sec:java_test_fixtures
v
If you want to reuse classes and resources for tests, you might want extracting them as a standalone -testkit module, and use it as dependency
v
What would be the benefit over using the java test fixtures plugin?
v
-testkit could be published and consumed by third-party code
v
No difference there.
The plugin defines a feature variant that you can choose to publish
r
Oooh, thanks that looks perfect to me.