Convenience method Project.configure(f,g) for g(f(proj)) to be used to apply plugin configuration provided as a Project=>Project transformation

This commit is contained in:
Mark Harrah 2013-01-10 16:06:12 -05:00
parent ae9b6d1e47
commit 1ef258d88e
1 changed files with 5 additions and 0 deletions

View File

@ -57,6 +57,11 @@ sealed trait Project extends ProjectDefinition[ProjectReference]
apply(id, base, aggregate = resolveRefs(aggregate), dependencies = resolveDeps(dependencies), delegates = resolveRefs(delegates), settings, configurations, auto)
}
/** Applies the given functions to this Project.
* The second function is applied to the result of applying the first to this Project and so on.
* The intended use is a convenience for applying default configuration provided by a plugin. */
def configure(transforms: (Project => Project)*): Project = Function.chain(transforms)(this)
/** Sets the base directory for this project.*/
def in(dir: File): Project = copy(base = dir)