问题
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?
回答1:
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.
来源:https://stackoverflow.com/questions/18984034/automatic-imports-in-gradle-plugin