首页 文章

Gradle插件兼容性 - 如何找出?

提问于
浏览
2

可以为1.11的Gradle插件工作2.如果没有,如何找出兼容性状态?

具体来说,我在项目spring-boot项目中使用Gradle 1.11取得了成功 . 升级到Gradle 2.2时,我注意到spring-boot插件似乎不可用,尽管我在Spring Boot Gradle文档(http://docs.spring.io/autorepo/docs/spring-boot/1.2.0.BUILD-SNAPSHOT/reference/html/build-tool-plugins-gradle-plugin.html)中没有找到对特定Gradle版本的任何引用 .

使用Gradle 2.2,我得到:

* What went wrong:
A problem occurred evaluating root project 'NN'.
> Failed to apply plugin [id 'spring-boot']
   > A problem occurred configuring project ':webapp'.
      > Extension of type 'SpringBootPluginExtension' does not exist. Currently registered extension types: [DefaultExtraPropertiesExtension, DefaultArtifactPub
licationSet_Decorated, ReportingExtension_Decorated, DefaultProjectSourceSet_Decorated, DefaultBinaryContainer_Decorated]

1 回答

  • 1

    它取决于特定的插件,理想情况下将在那里进行测试/记录 . 就Gradle使用的Groovy版本而言,1.x到2.x是一个很大的跳跃,这可能导致Groovy中实现的插件的兼容性问题 . 此外,使用已弃用或内部API的1.x插件可能无法在2.x中运行 .

相关问题