Commits

Meikel Brandmeyer committed 90bc554

Added helper to setup scp ant task

Comments (0)

Files changed (1)

src/main/groovy/clojuresque/ClojurePluginConvention.groovy

     boolean warnOnReflection
     boolean aotCompile
 
+    private boolean didConfigureDeployerJars = false
+
     public ClojurePluginConvention(Project project) {
         this.project = project
         this.warnOnReflection = false
             repos.flatDir name: 'gradleHome', dirs: new File(home + '/lib')
         }
     }
+
+    private void configureDeployerJars() {
+        if (!didConfigureDeployerJars) {
+            project.configurations {
+                clojarsDeployerJars {
+                    visible = false
+                    description = 'Private configuration to hold ssh wagon dependencies'
+                }
+            }
+            project.dependencies {
+                clojarsDeployerJars 'org.apache.ant:ant-jsch:1.7.0'
+            }
+
+            project.ant.taskdef name: 'clojarsScpDeploy', classname: 'org.apache.tools.ant.taskdefs.optional.ssh.Scp', classpath: project.configurations.clojarsDeployerJars.asPath
+
+            didConfigureDeployerJars = true
+        }
+    }
     }
 
     public boolean getWarnOnReflection() {