-
-
Save madmas/94069b45079a02804f3a to your computer and use it in GitHub Desktop.
build.gradle with vfs-gradle-plugin to upload to webdav
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
mavenLocal() | |
jcenter() | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'org.ysb33r.gradle:vfs-gradle-plugin:1.0-betaM' | |
classpath 'commons-net:commons-net:3.+' // If you want to use ftp | |
classpath 'commons-httpclient:commons-httpclient:3.1' // If you want http/https | |
classpath 'com.jcraft:jsch:0.1.48' // If you want sftp | |
classpath 'org.apache.jackrabbit:jackrabbit-webdav:2.11.1' | |
} | |
} | |
apply plugin : 'org.ysb33r.vfs' | |
apply plugin: 'java' | |
apply plugin: 'application' | |
mainClassName = 'de.mynethome.vfsSample.Application' | |
// Create a VFS task | |
task copyReadme << { | |
vfs { | |
cp 'https://raw.github.com/ysb33r/groovy-vfs/master/README.md', new File("${buildDir}/tmp/README.md") | |
} | |
} | |
task uploadDistZip << { | |
// build/distributions/gradleVfsSample.zip | |
vfs { | |
cp new File("${buildDir}/distributions/gradleVfsSample.zip"), "webdav://markus:password@myhost/owncloud/remote.php/webdav/UploadExperiment/" | |
} | |
} | |
uploadDistZip.dependsOn distZip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment