Created
August 21, 2013 23:37
-
-
Save uris77/6301552 to your computer and use it in GitHub Desktop.
Exclude from production.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(System.getProperty('grails.env') == 'test') { | |
test(':spock:0.7') { | |
excludes 'spock-grails-support', 'hibernate', 'grails-hibernate' | |
} | |
test ':code-coverage:1.2.5' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
One downside to this approach is that Grails caches its dependencies (see the
.resolve
file in the working directory). So switching between environments may introduce subtle problems unless you force a dependency refresh each time.My preferred approach is to add an
eventCreateWarStart
handler to the build that strips out the test dependencies before packaging the WAR. It's also pretty hacky 😄