Commits

Meikel Brandmeyer committed 09ff5e9

Add deps task

Fixes #13

Comments (0)

Files changed (1)

src/main/groovy/clojuresque/ClojurePlugin.groovy

 import org.gradle.api.internal.IConventionAware
 import org.gradle.api.internal.project.ProjectInternal
 import org.gradle.api.internal.tasks.DefaultSourceSet
+import org.gradle.api.tasks.Copy
 import org.gradle.api.tasks.SourceSet
 import org.gradle.api.plugins.Convention
 import org.gradle.api.plugins.JavaPlugin
 
 public class ClojurePlugin implements Plugin<Project> {
     public static final String UEBERJAR_TASK_NAME = 'ueberjar'
+    public static final String DEPS_TASK_NAME = 'deps'
 
     public void apply(Project project) {
         project.plugins.apply(JavaPlugin.class)
         configureConfigurations(project)
         configureArchives(project)
         configureUeberjar(project)
+        configureDepsTask(project)
     }
 
     private JavaPluginConvention javaConvention(Convention convention) {
             }
         }
     }
+
+    private void configureDepsTask(Project project) {
+        Copy deps = project.tasks.add(DEPS_TASK_NAME, Copy)
+
+        deps.configure {
+            description =
+                'Copy runtime dependencies into the build/lib directory'
+            into 'lib'
+            from project.configurations.testRuntime
+        }
+    }
 }