I have some teams that will have a multiproject with subprojects a
and b
. b
depends on compile project('a:')
. a
dependsOn testCompile project(':b')
when I apply a plugin that needs to resolve an unrelated configuration i get:
> A problem occurred configuring project ':a'.
> Cannot configure the 'publishing' extension after it has been accessed.
Here is an example to reproduce the issue: https://github.com/rspieldenner/configurationissue
If you go into a/build.gradle and uncomment the testCompile you will see the error.
Is this a bug or do I need to redesign these plugins to not do these steps in an afterEvaluate?
If a redesign how would you:
a) resolve a configuration to get a rule file without afterEvaluate and the rules will affect resolutionRules on the compile/testCompile configurations
b) configure some ivy/pom extra information without knowing what publications might be present