2014-10-20 21:18:55 +00:00
|
|
|
plugins {
|
|
|
|
id "com.github.jruby-gradle.jar" version "0.1.2"
|
|
|
|
// https://github.com/jruby-gradle/jruby-gradle-jar-plugin/issues/18
|
|
|
|
id "com.github.jruby-gradle.base" version "0.1.3"
|
|
|
|
id "com.github.johnrengelman.shadow" version "1.1.2"
|
|
|
|
}
|
|
|
|
apply plugin: 'maven'
|
|
|
|
apply plugin: 'java'
|
|
|
|
|
|
|
|
version = '0.7.0-SNAPSHOT'
|
|
|
|
group = 'com.github.jruby-gradle'
|
|
|
|
|
|
|
|
import com.github.jrubygradle.JRubyExec
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
|
|
|
|
maven { url 'http://clojars.org/repo/' }
|
|
|
|
maven { url 'http://conjars.org/repo/' }
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compile group: 'com.github.jnr', name: 'jffi', version: '1.2.7'
|
|
|
|
|
|
|
|
compile group: 'org.apache.storm',
|
|
|
|
name: 'storm-core',
|
|
|
|
version: '0.9.2-incubating'
|
2014-10-20 21:43:58 +00:00
|
|
|
|
|
|
|
jrubyExec group: 'rubygems', name: 'rspec', version: '2.13+'
|
|
|
|
jrubyExec group: 'rubygems', name: 'coveralls', version: '0.6.7+'
|
2014-10-20 21:18:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
configurations {
|
|
|
|
runtime.exclude module: 'storm-core'
|
2014-10-20 21:43:58 +00:00
|
|
|
jrubyExec.extendsFrom compile
|
2014-10-20 21:18:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
java {
|
|
|
|
srcDirs 'src/main',
|
|
|
|
"${buildDir}/generated/java"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task compileRedstormJRuby(type: JRubyExec) {
|
|
|
|
group 'build'
|
|
|
|
description "Compile the right Ruby files to Java files for compilation"
|
|
|
|
workingDir 'lib/red_storm'
|
|
|
|
jrubyArgs '-S'
|
|
|
|
script 'jrubyc'
|
|
|
|
scriptArgs '--prefix', 'red_storm',
|
|
|
|
'--java',
|
|
|
|
'--target', '../../build/generated/java',
|
|
|
|
'topology_launcher.rb'
|
|
|
|
|
|
|
|
file("${buildDir}/generated/java").mkdirs()
|
|
|
|
}
|
|
|
|
|
|
|
|
project.compileJava.dependsOn compileRedstormJRuby
|
|
|
|
|
|
|
|
|
|
|
|
jar {
|
|
|
|
from 'lib'
|
|
|
|
}
|
|
|
|
|
2014-10-20 21:43:58 +00:00
|
|
|
task spec(type: JRubyExec) {
|
|
|
|
group 'JRuby'
|
|
|
|
description 'Run the RSpec examples'
|
|
|
|
jrubyArgs '-S'
|
|
|
|
script 'rspec'
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-10-20 21:18:55 +00:00
|
|
|
// vim: ft=groovy et ts=4 sw=4
|
|
|
|
|