瀏覽代碼

GRADLE-1116: Add back workaround for depending on test sources

Rob Winch 12 年之前
父節點
當前提交
e1dfa81a0f
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      gradle/javaprojects.gradle

+ 8 - 0
gradle/javaprojects.gradle

@@ -166,6 +166,14 @@ eclipse.classpath {
     }
 }
 
+// GRADLE-1116
+project.eclipse.classpath.file.whenMerged { classpath ->
+    classpath.entries.removeAll { entry -> entry.path.endsWith('/build/resources/test') }
+    classpath.entries.removeAll { entry -> entry.path.endsWith('/build/classes/test') }
+    classpath.entries.removeAll { entry -> entry.path.endsWith('/build/resources/main') }
+    classpath.entries.removeAll { entry -> entry.path.endsWith('/build/classes/main') }
+}
+
 // GRADLE-1422
 project.eclipseClasspath.doFirst {
    // delay adding whenMerged till the entryAttributes are added (must be the last whenMerged)