I have created a Gradle plugin that has several custom task types. In order to use those task types in the build I need to explicitly import them. Is there a way to import those task classes automatically?
Asked
Active
Viewed 471 times
1 Answers
4
As far as I know, adding implicit imports isn't a public feature at this time. What you can do is to provide a plugin that covers the main use cases so that it's rarely necessary to declare tasks explicitly.

Peter Niederwieser
- 121,412
- 21
- 324
- 259
-
I was afraid of that :)! – Andrey Adamovich Sep 24 '13 at 18:39
-
Of course there are also hacks (use default package, make task `Class` instance available as top-level property), but I don't recommend to go there. – Peter Niederwieser Sep 24 '13 at 18:44
-
In fact, I tried adding Class instance properties, but it failed with exception upon plugin applying, – Andrey Adamovich Sep 24 '13 at 21:12