The plugins
block is the newer method of applying plugins, and they must be available in the Gradle plugin repository. The apply
approach is the older, yet more flexible method of adding a plugin to your build.
The new plugins
method does not work in multi-project configurations (subprojects
, allprojects
), but will work on the build configuration for each child project.
I would think that as functionality progresses, the plugins
configuration method will overtake the older approach, but at this point both can be and are used concurrently.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…