jruby-gradle-jar-plugin/build.gradle

112 lines
2.8 KiB
Groovy

apply plugin: 'groovy'
apply plugin: 'maven'
apply plugin: 'com.jfrog.bintray'
buildscript {
repositories { jcenter() }
dependencies { classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:0.5' }
}
group = 'com.github.jruby-gradle'
version = '0.1.4'
archivesBaseName = 'jruby-gradle-jar-plugin'
if (System.env.RELEASE != '1') {
version = "${version}-SNAPSHOT"
}
sourceCompatibility = '1.6'
targetCompatibility = '1.6'
repositories {
jcenter()
mavenLocal()
maven { url 'http://dl.bintray.com/rtyler/jruby' }
}
configurations {
testWarbler
}
dependencies {
compile gradleApi()
compile localGroovy()
compile 'com.github.jruby-gradle:jruby-gradle-plugin:0.1.9+'
runtime 'com.github.jengelman.gradle.plugins:shadow:1.1.2+'
testCompile ("org.spockframework:spock-core:0.7-groovy-${gradle.gradleVersion.startsWith('1.')?'1.8':'2.0'}") {
exclude module : 'groovy-all'
}
testRuntime 'com.github.jengelman.gradle.plugins:shadow:1.+'
// For the testWarbler tests I am locking the versions, instead of a open version, as it makes
// unit testing easier, This does not affect the final artifact.
// If you change values here, you need to update JRubyJarPluginSpec as well.
testWarbler 'com.github.jruby-gradle:warbler-bootstrap:0.1.0'
testWarbler ('org.jruby:jruby-complete:1.7.15') {
transitive = false
}
testWarbler ("org.spockframework:spock-core:0.7-groovy-2.0") {
transitive = false
}
}
ext {
testWarblerDir = new File(buildDir,'tmp/test/repo' )
}
test {
testLogging {
showStandardStreams = true
exceptionFormat "full"
}
doFirst {
copy {
from project.configurations.testWarbler.files
into testWarblerDir
}
}
systemProperties TESTROOT : new File(buildDir,'tmp/test/unittests').absolutePath
systemProperties WARBLER_LOCATION : testWarblerDir.absolutePath
systemProperties 'logback.configurationFile' : new File(projectDir,'src/test/resources/logback-test.xml').absolutePath
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives sourcesJar
}
bintray {
user = project.bintrayUser
key = project.bintrayKey
publish = true
dryRun = false
configurations = ['archives']
pkg {
userOrg = 'jruby-gradle'
repo = 'plugins'
name = 'jruby-gradle-jar-plugin'
labels = ['jruby']
version {
name = project.version
vcsTag = "v${project.version}"
attributes = ['gradle-plugin' : 'com.github.jruby-gradle.jar:com.github.jruby-gradle:jruby-gradle-jar-plugin']
desc = 'This plugin encapsulates java archive building functionality for JRuby Gradle projects'
}
}
}
bintrayUpload.dependsOn assemble
// vim: ft=groovy