I am fighting with a fairly simple gradle problem but despite searching I cannot find a solution. Very simple, in a multi project build, I need configure some subproject based on the plugins they load. So If sub project has plugin 'war' or 'ear' do this.. I have tried the following without success:
subprojects {
if (it.plugins.hasPlugin('war') || (it.plugins.hasPlugin('ear') {
apply plugin: 'my super special plugin'
....
....
}
}
The above never apply plugin: 'my super special plugin'
Any suggestion? Thanks