83 lines
1.9 KiB
Groovy
83 lines
1.9 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.1'
|
|
|
|
if (System.env.RELEASE != '1') {
|
|
version = "${version}-SNAPSHOT"
|
|
}
|
|
sourceCompatibility = '1.7'
|
|
|
|
repositories {
|
|
jcenter()
|
|
mavenLocal()
|
|
}
|
|
|
|
dependencies {
|
|
compile gradleApi()
|
|
compile localGroovy()
|
|
|
|
compile group: 'com.github.jruby-gradle', name: 'jruby-gradle-plugin', version: '0.1.+'
|
|
|
|
testCompile ("org.spockframework:spock-core:0.7-groovy-${gradle.gradleVersion.startsWith('1.')?'1.8':'2.0'}") {
|
|
exclude module : 'groovy-all'
|
|
}
|
|
}
|
|
|
|
test {
|
|
testLogging {
|
|
showStandardStreams = true
|
|
exceptionFormat "full"
|
|
}
|
|
}
|
|
|
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
|
classifier = 'sources'
|
|
from sourceSets.main.allSource
|
|
}
|
|
|
|
artifacts {
|
|
archives sourcesJar
|
|
}
|
|
|
|
// Ensure we don't fail in CI or on a system without these values set in
|
|
// ~/.gradle/gradle.properties
|
|
if (!hasProperty( 'bintrayUser' ))
|
|
ext.bintrayUser = ''
|
|
|
|
if (!hasProperty( 'bintrayKey' ))
|
|
ext.bintrayKey = ''
|
|
|
|
bintray {
|
|
user = project.bintrayUser
|
|
key = project.bintrayKey
|
|
publish = true
|
|
dryRun = false
|
|
configurations = ['archives']
|
|
|
|
pkg {
|
|
userOrg = 'jruby-gradle'
|
|
repo = 'plugins'
|
|
name = 'jruby-gradle-war-plugin'
|
|
labels = ['jruby','war','java']
|
|
|
|
version {
|
|
name = project.version
|
|
vcsTag = "v${project.version}"
|
|
attributes = ['gradle-plugin' : 'com.github.jruby-gradle:com.github.jruby-gradle:jruby-gradle-war-plugin']
|
|
desc = 'This plugin encapsulates web archive building functionality for JRuby Gradle projects'
|
|
|
|
}
|
|
}
|
|
}
|
|
bintrayUpload.dependsOn assemble
|
|
|
|
// vim: ft=groovy
|