Background: I was trying to move classes which we use from tests configurations into testFixtures, in order to speed up the build by having less shared code on the classpath, running doc generation only on testFixtures instead of all test classes, etc. So I moved the classes from src/test to src/testFixtures, added the ‘java-text-fixtures’ plugin, and built - and the compilation failed. But the weird thing was, the class it couldn’t find was one of the main classes in the very same module that was being tested.
I was trying to do this all in one go for the entire project though, so I didn’t have a good sense of where it broke. So now I’m investigating the cause.
Right now I’m here:
- Start from a working commit. (
check
passes) - Add just the plugin, at this point:
// ... some more above ... allprojects { apply plugin: 'java' apply plugin: 'java-test-fixtures' // <- Added just this apply plugin: 'com.acme.gradle.plugins.common' // our own common plugin } // ... a lot more below ...
- Try to run
:acme-common:compileTestJava
To my surprise, this fails, and I haven’t even moved around any sources yet, I’ve just applied one more plugin.
So where should I be looking next? What exactly does this plugin do when it is applied?
I’m guessing that there is some conflict with another plugin, potentially our own common config one, but I have no idea what to look for.