简体   繁体   中英

Can't get test fixtures to work in gradle

I've been using these answers to try to get a test class to be visible from subproject ":A:B" to ":A:C":

( https://discuss.gradle.org/t/gradle-test-classes-needed-in-another-sub-project/13365/2 )

( Multi-project test dependencies with gradle )

using plugin

Using any of these methods still gives me a java.lang.NoClassDefFoundError on Project B. I'm using gradle 7.2.

Is there another way to expose test fixtures in gradle?

您必须添加第三个模块,然后可以将其引用为testImplementation project()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM