Commits

Meikel Brandmeyer committed a32ebe9

Move clojure specific options into clojure aspect of the source set

  • Participants
  • Parent commits 6eee117

Comments (0)

Files changed (2)

File clojuresque-base/src/main/groovy/clojuresque/ClojureBasePlugin.groovy

             sourceSet.clojure.srcDir "src/${sourceSet.name}/clojure"
             sourceSet.allSource.source(clojureSourceSet.clojure)
 
-            sourceSet.delayedAotCompile       = { project.clojure.aotCompile }
-            sourceSet.delayedWarnOnReflection = { project.clojure.warnOnReflection }
+            sourceSet.clojure.delayedAotCompile =
+                { project.clojure.aotCompile }
+            sourceSet.clojure.delayedWarnOnReflection =
+                { project.clojure.warnOnReflection }
         }
     }
 
                 return
             def compileTaskName = set.getCompileTaskName("clojure")
             def task = project.task(compileTaskName, type: ClojureCompile) {
-                delayedAotCompile       = { set.aotCompile }
-                delayedWarnOnReflection = { set.warnOnReflection }
+                delayedAotCompile       = { set.clojure.aotCompile }
+                delayedWarnOnReflection = { set.clojure.warnOnReflection }
                 delayedDestinationDir   = { set.output.classesDir }
                 srcDir { set.clojure.srcDirs }
                 delayedClasspath = {

File clojuresque-base/src/main/groovy/clojuresque/tasks/ClojureSourceSet.groovy

 
 @GenericSourceSet(sourceName="clojure", sourcePatterns=["**/*.clj"])
 class ClojureSourceSet {
-    @Delayed
-    def aotCompile = false
-
-    @Delayed
-    def warnOnReflection = false
-
-    public void clojureIncludeNamespace(String pattern) {
-        clojure.include(
-            pattern.replaceAll("-", "_").replaceAll("\\.", "/") + ".clj"
-        )
-    }
-
-    public void clojureExcludeNamespace(String pattern) {
-        clojure.exclude(
-            pattern.replaceAll("-", "_").replaceAll("\\.", "/") + ".clj"
-        )
+    def protected initSourceSet(displayString, fileResolver) {
+        new ClojureSourceDirectorySet(displayString, fileResolver)
     }
 }