geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jinmeil...@apache.org
Subject [33/36] incubator-geode git commit: GEODE-1194: Improve Gradle build so that IntelliJ can correctly use test code in module dependencies
Date Fri, 08 Apr 2016 16:26:51 GMT
GEODE-1194: Improve Gradle build so that IntelliJ can correctly use test code in module dependencies


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/859f94bf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/859f94bf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/859f94bf

Branch: refs/heads/feature/GEODE-17-2
Commit: 859f94bf1cd7bd68e5d0c725a3d0959c739a4a5c
Parents: 43434b3
Author: Jens Deppe <jdeppe@pivotal.io>
Authored: Thu Apr 7 11:25:09 2016 -0700
Committer: Jens Deppe <jdeppe@pivotal.io>
Committed: Thu Apr 7 16:25:03 2016 -0700

----------------------------------------------------------------------
 extensions/geode-modules-tomcat7/build.gradle |  9 ++-------
 extensions/geode-modules/build.gradle         |  2 +-
 geode-assembly/build.gradle                   |  2 +-
 geode-cq/build.gradle                         |  2 +-
 geode-lucene/build.gradle                     |  2 +-
 geode-wan/build.gradle                        |  2 +-
 gradle/ide.gradle                             | 10 +++++++++-
 7 files changed, 16 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/859f94bf/extensions/geode-modules-tomcat7/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-tomcat7/build.gradle b/extensions/geode-modules-tomcat7/build.gradle
index 07619e8..975c976 100644
--- a/extensions/geode-modules-tomcat7/build.gradle
+++ b/extensions/geode-modules-tomcat7/build.gradle
@@ -46,12 +46,7 @@ dependencies {
   testRuntime 'javax.servlet:javax.servlet-api:' + project.'javax.servlet-api.version'
   testRuntime 'org.eclipse.persistence:javax.persistence:' + project.'javax.persistence-api.version'
 
-  provided(project(path: ':extensions/geode-modules', configuration: 'testOutput')) {
-    // Remove everything related to Tomcat 6.x
-    exclude group: 'org.apache.tomcat', module: 'catalina'
-    exclude group: 'org.apache.tomcat', module: 'catalina-ha'
-    exclude group: 'org.apache.tomcat', module: 'juli'
-  }
   testCompile project(path: ':geode-junit')
-  provided project(path: ':geode-core', configuration: 'testOutput')
+  testCompile files(project(':geode-core').sourceSets.test.output)
+  testCompile files(project(':extensions/geode-modules').sourceSets.test.output)
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/859f94bf/extensions/geode-modules/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/geode-modules/build.gradle b/extensions/geode-modules/build.gradle
index e007bca..81a926c 100644
--- a/extensions/geode-modules/build.gradle
+++ b/extensions/geode-modules/build.gradle
@@ -39,5 +39,5 @@ dependencies {
   testRuntime 'org.apache.tomcat:coyote:' + project.'tomcat6.version'
 
   testCompile project(path: ':geode-junit')
-  provided project(path: ':geode-core', configuration: 'testOutput')
+  testCompile files(project(':geode-core').sourceSets.test.output)
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/859f94bf/geode-assembly/build.gradle
----------------------------------------------------------------------
diff --git a/geode-assembly/build.gradle b/geode-assembly/build.gradle
index 207db73..b7d05e2 100755
--- a/geode-assembly/build.gradle
+++ b/geode-assembly/build.gradle
@@ -62,7 +62,7 @@ dependencies {
   archives project(':geode-cq')
 
   testCompile project(':geode-junit')
-  testCompile project(path: ':geode-core', configuration: 'testOutput')
+  testCompile files(project(':geode-core').sourceSets.test.output)
   testCompile ('org.springframework:spring-web:' + project.'springframework.version') {
     exclude module: 'aopalliance'
     exclude module: 'spring-aop'

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/859f94bf/geode-cq/build.gradle
----------------------------------------------------------------------
diff --git a/geode-cq/build.gradle b/geode-cq/build.gradle
index 081f903..b3a8449 100644
--- a/geode-cq/build.gradle
+++ b/geode-cq/build.gradle
@@ -17,7 +17,7 @@
 
 dependencies {
   provided project(':geode-core')
-  provided project(path: ':geode-core', configuration: 'testOutput')
 
+  testCompile files(project(':geode-core').sourceSets.test.output)
   testCompile project(':geode-junit')
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/859f94bf/geode-lucene/build.gradle
----------------------------------------------------------------------
diff --git a/geode-lucene/build.gradle b/geode-lucene/build.gradle
index c1eeb2e..699c0b5 100644
--- a/geode-lucene/build.gradle
+++ b/geode-lucene/build.gradle
@@ -31,7 +31,7 @@ dependencies {
     //Lucene test framework.
     testCompile 'org.apache.lucene:lucene-test-framework:' + project.'lucene.version'
     testCompile 'org.apache.lucene:lucene-codecs:' + project.'lucene.version'
-    testCompile project(path: ':geode-core', configuration: 'testOutput', transitive: false)
+    testCompile files(project(':geode-core').sourceSets.test.output)
 
     // the following test dependencies are needed for mocking cache instance
     testRuntime 'org.apache.hadoop:hadoop-common:' + project.'hadoop.version'

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/859f94bf/geode-wan/build.gradle
----------------------------------------------------------------------
diff --git a/geode-wan/build.gradle b/geode-wan/build.gradle
index 081f903..b3a8449 100644
--- a/geode-wan/build.gradle
+++ b/geode-wan/build.gradle
@@ -17,7 +17,7 @@
 
 dependencies {
   provided project(':geode-core')
-  provided project(path: ':geode-core', configuration: 'testOutput')
 
+  testCompile files(project(':geode-core').sourceSets.test.output)
   testCompile project(':geode-junit')
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/859f94bf/gradle/ide.gradle
----------------------------------------------------------------------
diff --git a/gradle/ide.gradle b/gradle/ide.gradle
index d6ac715..adaf8d9 100644
--- a/gradle/ide.gradle
+++ b/gradle/ide.gradle
@@ -25,6 +25,14 @@ subprojects {
       defaultOutputDir = file('build-eclipse')
       downloadSources = true
       plusConfigurations += [ configurations.provided ]
+      file {
+        // Remove the gradle output directories from the eclipse classpath.
+        // Unfortunately, using minusConfigurations does not work here, because
+        // it removes the entire geode-core project.
+        whenMerged { classpath ->
+            classpath.entries.removeAll { entry -> entry.path.contains('geode-core/build')}
+        }
+      }
     }
     project {
       name = sanitizedName()
@@ -39,7 +47,7 @@ subprojects {
       f.append('encoding/<project>=utf-8')
     }
   }
-  
+
   cleanEclipse << {
     delete '.settings/org.eclipse.core.resources.prefs'
   }


Mime
View raw message