[GRADLE-280] Make it easy to include external script files Created: 24/Oct/08  Updated: 04/Jan/13  Resolved: 19/Dec/10

Status: Resolved
Project: Gradle
Affects Version/s: 0.4
Fix Version/s: 0.9-rc-1

Type: Improvement
Reporter: Martin Vlcek Assignee: Adam Murdoch
Resolution: Fixed Votes: 0


Often you want to do general configurations in all your projects. In ant you would import another build file.

In gradle you could do it like this:
def configFileName = ...
new GroovyShell(new Binding(project:project)).evaluate(new File(configFileName))

It would be nice to have a function in the Project class to do this in an easier way:
void include(String filename)

{ new GroovyShell(new Binding(project:this)).evaluate(new File(filename)) }

Or better even: also handle URL strings like
If it's no an URL, it is handled as file name.

Comment by Jon Cox [ 23/Jan/09 ]

It seems like a fix for GRADLE-366 might also be helpful here.

Generated at Wed Jun 30 11:26:09 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.