This message was deleted.
# plugin-development
s
This message was deleted.
t
I had a similar issue in my project as well and I did
project.rootProject.tasks.maybeCreate
on each plugin application. It worked, but this might fail some Gradle internals (e.g. configuration caching [didn't test yet]).
j
You can either only register the task in the root project so there is only one task or use a build service to generate that file and ensuring it is not accessed concurrently and having a flag to avoid the second task doing anything because another one is already doing the job
e
or apply a plugin to the root project
e.g. in this example project,
Copy code
$ gradle --dry-run myTask
:myConfig SKIPPED
:app:myTask SKIPPED
:lib:myTask SKIPPED
(because plugins are only applied once)