Why are plugins defined with "apply false" in the project-level build.gradle.kts? #1944
Unanswered
jaemin-Yoo
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Because of the plugin contains bundle of tasks and that was usually no need at the top of project. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm a junior Android developer studying with the nia project and I really appreciate the quality sample project provided.
I have noticed that the
build.gradle.kts(project root)
file defines several plugins withapply false
.As I understand it, plugins defined with
apply false
are not applied at the project level, and need to be explicitly applied in the module-level build scripts where they are needed.If the plugins need to be applied at the module level, I am wondering why they are also defined in the project-level script.
The comment in the plugins block says:
I understand that this is meant to keep the buildscript classpath consistent, but since nia uses version catalogs, wouldn't the classpath remain consistent even if plugins are only defined at the module level?
Could you please explain the practical reason for defining plugins with
apply false
in the project-levelbuild.gradle.kts
?Thank you.
Beta Was this translation helpful? Give feedback.
All reactions