Thanks I will give this a shot.

-----Original Message-----
From: Peter Niederwieser [mailto:[email protected]] 
Sent: Monday, February 07, 2011 3:48 PM
To: [email protected]
Subject: [gradle-user] RE: Simulating Maven Profiles


To get something similar to Maven's profiles, add the following to your build
script (or to a separate script pulled in with "apply from: ..."):

if (hasProperty("dev")) {
   // adapt configuration to dev environment
} else if (hasProperty("test")) {
   // adapt configuration to test environment
}

You can then select an environment like so:

gradle build -Ptest

--
Peter Niederwieser 
Developer, Gradle
http://www.gradle.org
Trainer & Consultant, Gradle Inc.
http://www.gradle.biz
Founder, Spock Framework
http://spockframework.org

-- 
View this message in context: 
http://gradle.1045684.n5.nabble.com/Simulating-Maven-Profiles-tp3374782p3374905.html
Sent from the gradle-user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to