自动导入Gradle插件 [英] Automatic imports in Gradle plugin
本文介绍了自动导入Gradle插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我创建了一个Gradle插件,该插件具有多种自定义任务类型.为了在构建中使用这些任务类型,我需要显式导入它们.有没有办法自动导入那些任务类?
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?
推荐答案
据我所知,添加隐式导入目前还不是公共功能.您可以做的是提供一个涵盖主要用例的插件,这样就几乎不需要显式声明任务.
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.
这篇关于自动导入Gradle插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文