Is there a gradle find option?

Is there a gradle find option? Similar to the ant -f option?

‘gradle -h’ lists all command line parameters.

I ran that and didn’t see anything which is why I posted here… wondering if there was some undocumented option that I’m not aware of. Coming from an ant environment, this is something that I use all the time. I’ll go ahead and submit a feature request.

Thanks

So you mean ‘ant -find’, not ‘ant -f’. Gradle automatically searches upwards for ‘settings.gradle’, and you can pass a different name for the settings script with ‘-c’. Everything else (e.g. location of build scripts) follows from that.

Sorry, yes ant -find.

The -c is fine for the settings file, but what I’m looking for is something similar to this, but for the build.gradle files. For example, if I’m 5 directories deep in a project directory, I would like to simply do a gradle -find. I know I can specify the build file (-b), but it would be nice to just search upwards for the nearest one instead of typing in the path to the file. Another cool feature in a multi project build would be to find the nearest '‘root’ build.gradle file.

I see. I suggest to file an “idea” with a more detailed description of what you have in mind. Or, if you are interested to work on this yourself, make a proposal on the dev list.