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
// Assumuing that the build flow tracks another job's SVN revision | |
// Get the SVN URLs and revisions | |
def svn=build.getAction(hudson.scm.RevisionParameterAction.class) | |
svn.revisions.each { | |
println it.SVNURL | |
println it.revision | |
} | |
// Get the Build number of the job being tracked |
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
@Grab( 'org.codehaus.groovy.modules.http-builder:http-builder:0.5.2' ) | |
import groovyx.net.http.RESTClient | |
import groovyx.net.http.HttpResponseException | |
def repoOwner = 'ysb33r' | |
def repoName = 'grysb33r' | |
def packageName = 'bintray-gradle-plugin' | |
def bintrayUsername = '__YOUR_USERNAME__' | |
def bintrayApiKey = '__YOUR_APIKEY__' | |
def packageVersion = '0.1' |
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
import org.ysb33r.groovy.dsl.vfs.VFS | |
def vfs = new VFS() | |
// --------------------------------- | |
// Adding new providers with schemes | |
// --------------------------------- | |
vfs { | |
extend { | |
// Adding provider with no external dependencies |
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
import org.ysb33r.gradle.vfs.* | |
// Assuming we have properties in gradle.properties | |
// userNameFrom | |
// passwordFrom | |
// userNameTo | |
// passwordTo | |
task simpleCopyTask ( type : VfsCopy ) { | |
from 'ftp://${userNameFrom}:${passwordFrom}@from.here/a.txt' |
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
// Check whether --offline was passed to gradle and set it in the test configuration's system properties | |
test { | |
if(gradle.startParameter.isOffline()) { | |
systemProperties 'TESTS.ARE.OFFLINE' : '1' | |
} | |
} |
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
// This is just a concept - this code does not exist !! | |
// I have placed it here in order to facilitate discussion | |
// let's assume that we have specified the lcoation of the jruby | |
// plugin in buildscript {} block | |
apply plugin : 'jruby' | |
repositories { | |
jcenter() | |
} |
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
// You will need the VFS plugin | |
buildscript { | |
repositories { | |
jcenter() | |
} | |
dependencies { | |
// Set your | |
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:0.7.0' | |
classpath 'org.ysb33r.gradle:vfs-gradle-plugin:0.5' |
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
// IN the build.gradle file | |
test { | |
systemProperties 'logback.configurationFile' : new File(projectDir,'src/test/resources/logback-test.xml').absolutePath | |
} |
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
// This is a first stab at trying to convert the asciidoctorj pom.xml to build.gradle | |
// Note the WORKAROUND. These are to work around problems with erubis. Gradle is much stricter | |
// about broken POMs that Maven. | |
// | |
// This had been done using some code which is is based on the current version of jruby-gradle-plugin, | |
// but with updates to fix shortcomings in the release 2.2.0 | |
// | |
// This requires Gradle 2.0 or better. | |
// | |
buildscript { |
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 { | |
jcenter() | |
mavenLocal() | |
} | |
dependencies { | |
classpath 'com.github.jruby-gradle:jruby-gradle-plugin:0.1.2-SNAPSHOT' | |
classpath 'org.ysb33r.gradle:vfs-gradle-plugin:0.5' |