Permalink
Browse files

injecting slf4j-simple library into generated IntelliJ idea module fi…

…les (*.iml) upon 'gradle idea' to allow unit tests running inside the IDE
  • Loading branch information...
1 parent 19e0e7c commit fb0aaf0c57577d9fbb56138fa62e0562cfa385ea @sarmbruster sarmbruster committed Jul 28, 2011
Showing with 10 additions and 0 deletions.
  1. +10 −0 build.gradle
View
@@ -79,6 +79,16 @@ subprojects { project ->
options.debug = true
}
+ ideaModule {
+ // pathVariables GRADLE_USER_HOME: file('/home/myuser/.gradle') // that does not work
+ whenConfigured { module ->
+ // adding slf4j-simple with scope TEST to .iml
+ module.dependencies << new org.gradle.plugins.ide.idea.model.ModuleLibrary(
+ [new org.gradle.plugins.ide.idea.model.Path("jar://\$GRADLE_USER_HOME/cache/org.slf4j/slf4j-simple/jars/slf4j-simple-${slf4jVersion}.jar!/")], [], [], [], "TEST"
+ )
+ }
+ }
+
repositories {
mavenRepo(urls: "http://repo.grails.org/grails/core") {
if (project.hasProperty('snapshotTimeout')) {

0 comments on commit fb0aaf0

Please sign in to comment.