为什么不能在buildSrc中发布插件?

来源:3-9 实战:发布与使用插件-1

那一瞥的温柔

2021-04-05

写回答

1回答

allenfeng

2021-04-06

buildSrc is now reserved as a project and subproject build name

Previously, Gradle did not prevent using the name “buildSrc” for a subproject of a multi-project build or as the name of an included build. Now, this is not allowed. The name “buildSrc” is now reserved for the conventional buildSrc project that builds extra build logic.

Typical use of buildSrc is unaffected by this change. You will only be affected if your settings file specifies include("buildSrc") or includeBuild("buildSrc")

引自:https://docs.gradle.org/current/userguide/upgrading_version_5.html



6.x版本的Gradle,buildSrc被作为保留字段,不允许在 settings.gradle 中声明,进而导致发布脚本中无法直接引用到buildSrc工程进行直接发布。

0
0

Android 应用程序构建实战+原理精讲

深度掌握 Gradle 使用,系统性学习 Android 应用构建知识

450 学习 · 116 问题

查看课程