From 566328fea4896b99a8e879ba9481308f33857449 Mon Sep 17 00:00:00 2001 From: Luke Taylor Date: Tue, 24 Aug 2010 22:36:42 +0100 Subject: [PATCH] Minor tweaking of IDEA deps. --- build.gradle | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 2a360befe3..c565babd8c 100644 --- a/build.gradle +++ b/build.gradle @@ -47,6 +47,8 @@ configure (aspectjProjects) { apply from: "$rootDir/gradle/dist.gradle" +apply plugin: 'idea' + configure(javaProjects) { apply plugin: 'idea' apply plugin: 'eclipse' @@ -57,11 +59,22 @@ configure(javaProjects) { gradleCacheVariable = 'GRADLE_CACHE' outputDir = "$rootProject.projectDir/intellij/out" as File testOutputDir = "$rootProject.projectDir/intellij/testOut" as File + whenConfigured { module -> + def allClasses = module.dependencies.findAll() { dep -> + if (dep instanceof org.gradle.plugins.idea.model.ModuleLibrary + && dep.classes.find { path -> + path.url.matches('.*jcl-over-slf4j.*') || + path.url.matches('.*servlet-api.*') || + path.url.matches('.*jsp-api.*') + }) { + dep.scope = 'COMPILE' + dep.exported = false + } + } + } } } -apply plugin: 'idea' - ideaModule { excludeDirs += file('.gradle') excludeDirs += file('buildSrc/build') @@ -70,7 +83,7 @@ ideaModule { ideaProject { javaVersion = '1.6' - subprojects = javaProjects + subprojects = [rootProject] + javaProjects withXml { node -> // Use git def vcsConfig = node.component.find { it.'@name' == 'VcsDirectoryMappings' }