I have a gradle build script where:
- Task B dependsOn Task A
- IThe configuration of Task B depends on extensions made in the configuration of Task A
ext[“TaskAExt”] = SomeImportantObject
val someImportantObject = ext[“TaskAExt”]
Unfortunately, it appears that, even though TaskB is executed after TaskA, TaskB is configured before TaskA. This causes the configuration of TaskB to error out with the message:
Cannot get property ‘TaskAExt’ on extra properties extension as it does not exist.
Is there any way to control the order of the configuration of the tasks, in particular so that TaskA is configured before TaskB?