46 lines
962 B
Groovy
46 lines
962 B
Groovy
plugins {
|
|
id 'idea'
|
|
id 'java'
|
|
id 'com.github.jruby-gradle.base' version '1.7.0'
|
|
id 'com.github.jruby-gradle.jar' version '1.7.0'
|
|
}
|
|
|
|
group 'com.github.jrubygradle'
|
|
version '0.1'
|
|
|
|
import com.github.jrubygradle.JRubyExec
|
|
|
|
repositories {
|
|
jcenter()
|
|
}
|
|
|
|
configurations {
|
|
jrubyJar.extendsFrom compile
|
|
// THe RSpec configuration needs our full classpath
|
|
rspec.extendsFrom compile
|
|
}
|
|
|
|
dependencies {
|
|
compile 'org.apache.spark:spark-sql_2.12:[2.4.3,3.0)'
|
|
rspec 'rubygems:rspec:[3.8.0,4.0)'
|
|
}
|
|
|
|
jrubyJar {
|
|
group 'Redspark'
|
|
description 'Package up a jar for Spark execution'
|
|
dependsOn compileJava, jar
|
|
initScript "${projectDir}/simple.rb"
|
|
}
|
|
|
|
task spec(type: JRubyExec) {
|
|
group 'Redspark'
|
|
description 'Execute RSpec against spec/**/*.rb'
|
|
|
|
dependsOn 'compileJava'
|
|
classpath "${buildDir}/classes/java/main", configurations.compile.asPath
|
|
configuration 'rspec'
|
|
|
|
script 'rspec'
|
|
inputs.dir 'spec'
|
|
}
|