dave08
06/29/2021, 1:51 PMBig Chungus
06/29/2021, 1:53 PMdependencies {
testImplementation(project(":another-module", configuration= "test")
}
Big Chungus
06/29/2021, 1:53 PMdave08
06/29/2021, 1:56 PMdave08
06/29/2021, 1:57 PMdave08
06/29/2021, 1:57 PMtestImplementation(project(":domain", configuration = "test"))
`dave08
06/29/2021, 1:58 PMconfiguration=
inside the project(...)
?Big Chungus
06/29/2021, 1:58 PMtestImplementation(project(":domain", configuration = "test"))
dave08
06/29/2021, 1:59 PMdave08
06/29/2021, 1:59 PMBig Chungus
06/29/2021, 2:00 PMBig Chungus
06/29/2021, 2:00 PMBig Chungus
06/29/2021, 2:00 PM:domain
module jvm-only or mpp?Big Chungus
06/29/2021, 2:01 PMcommonTest
dave08
06/29/2021, 2:02 PMimplementation
(w/o the test configuration).Big Chungus
06/29/2021, 2:03 PMtestImplementation(project(":domain", configuration = "testArtifacts"))
dave08
06/29/2021, 2:04 PMCould not resolve project :domain.Required by: project :data > Project :data declares a dependency from configuration 'testImplementation' to configuration 'testArtifacts' which is not declared in the descriptor for project :domain.
dave08
06/29/2021, 2:05 PMBig Chungus
06/29/2021, 2:06 PMtestImplementation(project(path = ":domain", configuration = "testArtifacts"))
Big Chungus
06/29/2021, 2:11 PMtestImplementation(project(path = ":domain", configuration = "testRuntimeClasspath"))
Big Chungus
06/29/2021, 2:11 PMBig Chungus
06/29/2021, 2:19 PMtestImplementation(project(path = ":domain", configuration = "testImplementation"))
christophsturm
06/29/2021, 2:41 PMdave08
06/29/2021, 3:10 PMtestImplementation(project(":domain", configuration = "testImplementation"))
gives:
Could not resolve project :domain.
Required by:
project :datadave08
06/29/2021, 3:11 PMdave08
06/29/2021, 3:17 PMtestImplementation(project(":domain").dependencyProject.sourceSets.test.get().output)
worked! Not so nice, but it works 🙈!Vampire
06/29/2021, 7:12 PMVampire
06/29/2021, 7:14 PMVampire
06/29/2021, 7:15 PMdave08
06/30/2021, 3:30 PMVampire
06/30/2021, 3:40 PMjava-test-fixtures
plugin and it is simple.
It abstracts the complex attribute and variant stuff away to have it easily usable. 🙂dave08
06/30/2021, 3:43 PMtest
variant itself, but it could clean up the variant if I separate all the fixture code out...Vampire
06/30/2021, 3:48 PMtest
variant and also no test
configuration which is why some of the suggested things didn't work.
There is a test
source set.
But there are by default no consumable configurations that other projects can resolve as those are not intended to be shared.
That's why you either if you don't want to publish it, can simply create a consumable configuration that other projects can safely resolve, or use the java-test-fixtures
plugin that does it for you in a high-level way nicely where you then can separate the exact things you want to share with other projects as you usually don't want to share the actual tests with other projects.