Slackbot
03/07/2023, 8:45 PMVampire
03/08/2023, 2:18 PMpluginManagement.repositories
. That can work for project plugins but it cannot work for settings plugins. Do pluginManagement { repositories }
, because the block is extracted and evaluated separately first, so that it can influence settings plugin resolving.ephemient
03/08/2023, 2:33 PMpluginManagement
, this applies to a few other magical blocks, buildscript
, initscript
, and plugins
. they all potentially impact how the script itself is built, so they need to be in a format that Gradle can extract and evaluate before the rest of the scriptLuc-Antoine Girardin
03/08/2023, 3:31 PM.apply { }
... Is there some further reading on the differences between the .
and the block notation?Vampire
03/08/2023, 3:35 PMbuildscript { ... }
block which has to be extracted as it is used to add stuff to the build script's classpath that are necessary to compile the build script, so it of course needs to be evaluated separately first.
Or the plugins { ... }
block (for Kotlin DSL at least) as it is transplanted to a dummy build that is then evaluated and investigated to determine which type-safe accessors must be generated so that the build script can compile with them and use them.
Or the pluginManagement { ... }
block which is necessary, so that it can influence resolution of settings plugin in the settings script itself like defining plugin repositories or including plugin builds.
Specifically for the pluginManagement
block there is no real documentation about this, but at least all examples and text use the block syntax.
In the upgrading section of the user guide it is mentioned that the pluginManagement
block is now isolated like buildscript
and plugins
too.Luc-Antoine Girardin
03/08/2023, 3:46 PM.
notation when I can to reduce indentation when possible but I'll have to be carefulVampire
03/08/2023, 3:47 PM