Have plugin location conventions changed recently (/gradle folder)?


(Bernhard Woditschka) #1

In Gradle version 1.3 plugins in the /gradle subfolder have been picked up automatically.

Folder layout: ‘’’ build.gradle src … gradle

+plugin1.gradle

+plugin2.gradle ‘’’ In Version 1.5 and 1.6 this doesn’t seem to be true anymore

Plugins can be used with the following lines in build.gradle:

‘’’ apply from: ‘gradle/plugin1.gradle’ apply from: ‘gradle/plugin2.gradle’ ‘’’

My questions are:

  1. Have the conventions changed? 2) What’s the right way to include local plugins?

Regards, Bernhard


(Peter Niederwieser) #2

Script plugins were never picked up automatically. They always required an ‘apply from:’, and they still do.


(Bernhard Woditschka) #3

Hi Peter, is it possible to use wildcards?

e.g.

‘’’ apply from: ‘gradle/*’ ‘’’


(Peter Niederwieser) #4

No, wildcards aren’t supported. You can have one script that in turn applies others, either by listing them individually or (if really necessary) by scanning the file system.


(Bernhard Woditschka) #5

Thx, for the fast answer :slight_smile: