今天更新了新版本的 Android Studio ,其中我看到项目根目录的 gradle 文件变成了这个样子
plugins {
id 'com.android.application' version '7.1.1' apply false
id 'com.android.library' version '7.1.1' apply false
}
这个 apply false 是干嘛的?
1
somebody 2022-02-06 10:24:09 +08:00 2
If you have a multi-project build, you probably want to apply plugins to some or all of the subprojects in your build, but not to the root project. The default behavior of the plugins {} block is to immediately resolve and apply the plugins. But, you can use the apply false syntax to tell Gradle not to apply the plugin to the current project and then use the plugins {} block without the version in subprojects' build scripts
> https://docs.gradle.org/current/userguide/plugins.html |
3
petercui 2022-02-06 18:21:28 +08:00
apply false 大概就是 引用了插件但是不应用 吧 。
|