How to use pluginRepositories with allprojects/subprojects?


(Axel von Engel) #1

I just read about the new possibility to configure pluginRepositories {} in the settings.gradle. Our multi-project build applies plugins to subprojects via allprojects & subprojects blocks, though.
As we can’t use plugins {} syntax in the subprojects block, is it possible to use the new functionality in such a setup at all?

I wouldn’t mind to change the build setup. But since the root project applies common configuration to the subprojects, I wouldn’t want to move and duplicate that into each subproject.

(Pepper Lebeck-Jobe) #2


In the upcoming 3.0-M2 milestone we are adding the support for using subprojects in concert with the plugins {} block. It will look something like this.

plugins {
  id 'org.jvj.myplugin' version '2.4.601' apply false

subprojects {
  apply plugin: 'org.jvj.myplugin'