Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the meaning of 'sourceSets.all*'

Tags:

gradle

groovy

I'm new to gradle & groovy, and I don't know the exact meaning of such a statement:

sourceSets.all*.java

Is it a valid groovy expression?

like image 870
xinthink Avatar asked Dec 21 '11 03:12

xinthink


1 Answers

It is a Groovy GPath expression. *. calls a property or method (java in this case) on every element in a collection (sourceSets.all in this case), and returns a collection of the results. In this case it will give you a collection of all Java SourceDirectorySets. In the case of reading a property (like here), the * can even be omitted.

like image 110
Peter Niederwieser Avatar answered Sep 21 '22 21:09

Peter Niederwieser