118 lines
3.0 KiB
Groovy
118 lines
3.0 KiB
Groovy
buildscript {
|
|
repositories {
|
|
jcenter()
|
|
|
|
maven {
|
|
url "https://plugins.gradle.org/m2/"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2"
|
|
classpath "org.ysb33r.gradle:gradletest:0.5.4"
|
|
}
|
|
}
|
|
apply plugin: 'codenarc'
|
|
apply plugin: 'groovy'
|
|
apply plugin: 'maven'
|
|
apply plugin: 'com.jfrog.bintray'
|
|
apply from: 'gradle/integration-test.gradle'
|
|
|
|
group = 'com.github.jruby-gradle'
|
|
version = '0.4.2'
|
|
defaultTasks 'check', 'assemble'
|
|
|
|
// Any time we're not expicitly saying "build me a release build" we'll change
|
|
// the version to -SNAPSHOT
|
|
if (!(System.env.TRAVIS_TAG as Boolean)) {
|
|
version = "${version}-SNAPSHOT"
|
|
}
|
|
|
|
repositories {
|
|
jcenter()
|
|
}
|
|
|
|
dependencies {
|
|
compile new GradleDist(project, '2.0').asFileTree
|
|
|
|
['jruby-gradle-plugin', 'jruby-gradle-jar-plugin'].each { String plugin ->
|
|
String pluginDependency = "com.github.jruby-gradle:${plugin}:${jrubyGradleMinVersion}"
|
|
compile pluginDependency
|
|
gradleTest pluginDependency
|
|
}
|
|
|
|
testCompile ("org.spockframework:spock-core:0.7-groovy-${gradle.gradleVersion.startsWith('1.')?'1.8':'2.0'}") {
|
|
exclude module : 'groovy-all'
|
|
}
|
|
|
|
/* Used for mocking non interface types */
|
|
testCompile 'cglib:cglib-nodep:3.1'
|
|
}
|
|
|
|
plugins.withType(JavaPlugin) {
|
|
sourceCompatibility = 1.7
|
|
targetCompatibility = 1.7
|
|
|
|
project.tasks.withType(JavaCompile) { task ->
|
|
task.sourceCompatibility = project.sourceCompatibility
|
|
task.targetCompatibility = project.targetCompatibility
|
|
}
|
|
|
|
project.tasks.withType(GroovyCompile) { task ->
|
|
task.sourceCompatibility = project.sourceCompatibility
|
|
task.targetCompatibility = project.targetCompatibility
|
|
}
|
|
}
|
|
|
|
codenarc {
|
|
sourceSets = [sourceSets.main]
|
|
configFile = file('gradle/codenarc.xml')
|
|
}
|
|
|
|
test {
|
|
testLogging {
|
|
exceptionFormat "full"
|
|
events "passed", "skipped", "failed", "standardOut", "standardError"
|
|
}
|
|
}
|
|
|
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
|
classifier = 'sources'
|
|
from sourceSets.main.allSource
|
|
}
|
|
|
|
artifacts {
|
|
archives sourcesJar
|
|
}
|
|
|
|
bintray {
|
|
user = project.bintrayUser
|
|
key = project.bintrayKey
|
|
publish = true
|
|
configurations = ['archives']
|
|
/*
|
|
* Only only publish when we're tagging a release and if we've executed on
|
|
* the JDK7 build. This is to prevent multiple attempts by the build matrix
|
|
* to publish the artifacts
|
|
*/
|
|
dryRun = !((System.env.TRAVIS_TAG as boolean) && (System.env.TRAVIS_JDK_VERSION == 'openjdk7'))
|
|
|
|
pkg {
|
|
userOrg = 'jruby-gradle'
|
|
repo = 'plugins'
|
|
name = 'jruby-gradle-storm-plugin'
|
|
labels = ['jruby','storm','java']
|
|
|
|
version {
|
|
name = project.version
|
|
vcsTag = "v${project.version}"
|
|
attributes = ['gradle-plugin' : 'com.github.jruby-gradle.storm:com.github.jruby-gradle:jruby-gradle-storm-plugin']
|
|
desc = project.description
|
|
}
|
|
}
|
|
}
|
|
bintrayUpload.dependsOn assemble
|
|
install.dependsOn check, assemble
|
|
|
|
// vim: ft=groovy
|