I am developing a gradle plugin to config a task parameter, then i use another gradle plugin to consolidate these parameters to generate every task inside one application, is it doable?
g
gildor
12/08/2019, 3:08 PM
Still not clear for me why you want to check that every sub project has a plugin. Probably you should react on plugin application instead, you can use plugins.withType(SomeType) to know when plugin is applied, because it may be lazy action, you shouldn't rely on plugins application order, it's not guaranteed
gildor
12/08/2019, 3:09 PM
Also all actions with all subprojects (such as subprojects/allprojects block) break configuration on demand, I would avoid this practice and apply plugin to every module explicitly
i
iammini5
12/08/2019, 10:57 PM
you are right, it might be not efficient to do so, what you would recommend to implement this situation, to consolidated the individual configurations from sub project and generate the tasks inside another project to use these parameters
g
gildor
12/09/2019, 7:51 AM
Every project should create own task with the same name and you will run them together by ./gradlew taskName, which will execute tasks on every module.
Connect modules using top level project is possible, but looks like a hack for me