I am writing a custom gradle plugin for Android. I want to create a task that depends on the output of the AGP built-in task and it maybe changes the input of that task so the built-in task must be run again, But this creates circular dependency between tasks.
Scenario:
- input file of AGP task
- AGP task run and produces an output
- MyTask processes this output and changes the input file
- AGP task run again and produces an output
- MyTask processes this output and decides no need to change
build finished.
How can I implement this scenario with Gradle? I can not copy the AGP task or call the action of it from MyTask?