Skip to content

Commit cde1607

Browse files
committed
Explain why the plugins get listed in the root project build script
It dispels a bit of the magic that happens during a build. See the patch for the thorough explanation.
1 parent 373dae2 commit cde1607

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

build.gradle.kts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,13 @@ buildscript {
3030

3131
}
3232

33-
// Lists all plugins used throughout the project
33+
/*
34+
* By listing all the plugins used throughout all subprojects in the root project build script, it
35+
* ensures that the build script classpath remains the same for all projects. This avoids potential
36+
* problems with mismatching versions of transitive plugin dependencies. A subproject that applies
37+
* an unlisted plugin will have that plugin and its dependencies _appended_ to the classpath, not
38+
* replacing pre-existing dependencies.
39+
*/
3440
plugins {
3541
alias(libs.plugins.android.application) apply false
3642
alias(libs.plugins.android.library) apply false

0 commit comments

Comments
 (0)