There is a gradle.properties in ~/.gradle but that's not the full solution you're looking for :) AFAIK there isn't anything built into Gradle core that works exactly this way, though it really wouldn't be very hard to add it into your build. You could do something like gradle archive -DpropertyFile then in the build.gradle
Properties p = file(project.propertyFile) p.each( k, v -> project.addProperty(k, v) ) Or something similar to that (note I haven't tested that so it may not work, but you get the idea). On Thu, Apr 22, 2010 at 03:34, Donal Mc Namee <[email protected]> wrote: > Hi, > Is there a convenient way I can pass a property file with a number of > key/value pairs to my gradle build? > > Basically, I have a number of environment specific property files, each > containing a number of settings specific to an environment. > The property files are named after the environment (e.g. > 'integration.properties', 'uat.properties', etc...) > > What I'm looking for is some way to pass this file to gradle and have it > expand the values of the propertyfile in the gradle build. > The answer is probably really simple, but I can't see an easy way to do > this. > > Ideas appreciated, > Donal. > -- Jason Porter Software Engineer Open Source Advocate PGP key id: 926CCFF5 PGP key available at: keyserver.net, pgp.mit.edu
