Преглед на файлове

Use included configuration instead of sourceSets.main.output

Previously the crypto module was not exported in Eclipse because it was
listed as a test dependency to have it added as a dependency. Note that
this was all to work around GRADLE-1116

Now we add an included configuration that is exported for Eclipse, but not
added to the Maven pom (since all the crypto module is included in core).
Rob Winch преди 12 години
родител
ревизия
9d58317731
променени са 3 файла, в които са добавени 10 реда и са изтрити 19 реда
  1. 10 7
      core/core.gradle
  2. 0 6
      core/pom.xml
  3. 0 6
      gradle/ide-integration.gradle

+ 10 - 7
core/core.gradle

@@ -4,9 +4,14 @@
 def cryptoProject = project(':spring-security-crypto')
 def cryptoClasses = cryptoProject.sourceSets.main.output
 
+configurations {
+    included
+
+    compile.extendsFrom included
+}
+
 dependencies {
-    compile cryptoProject.sourceSets.main.output,
-            'aopalliance:aopalliance:1.0',
+    compile 'aopalliance:aopalliance:1.0',
             "org.springframework:spring-aop:$springVersion",
             "org.springframework:spring-beans:$springVersion",
             "org.springframework:spring-context:$springVersion",
@@ -18,8 +23,9 @@ dependencies {
              "org.springframework:spring-jdbc:$springVersion",
              "org.springframework:spring-tx:$springVersion"
 
-    testCompile cryptoProject,
-                'commons-collections:commons-collections:3.2',
+    included cryptoProject
+
+    testCompile 'commons-collections:commons-collections:3.2',
                 "org.springframework:spring-test:$springVersion",
                 "org.slf4j:jcl-over-slf4j:$slf4jVersion",
                 powerMockDependencies
@@ -28,9 +34,6 @@ dependencies {
                 "cglib:cglib-nodep:$cglibVersion"
 }
 
-compileJava.dependsOn cryptoProject.compileJava
-classes.dependsOn cryptoProject.classes
-
 classes.doLast {
     copy {
         from cryptoClasses

+ 0 - 6
core/pom.xml

@@ -200,12 +200,6 @@
       <version>1.7.5</version>
       <scope>test</scope>
     </dependency>
-    <dependency>
-      <groupId>org.springframework.security</groupId>
-      <artifactId>spring-security-crypto</artifactId>
-      <version>3.2.0.CI-SNAPSHOT</version>
-      <scope>test</scope>
-    </dependency>
     <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring-test</artifactId>

+ 0 - 6
gradle/ide-integration.gradle

@@ -8,12 +8,6 @@ configure(allprojects) {
 configure(javaProjects) {
      eclipse.classpath.downloadSources = true
 
-    // 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