blick/build.gradle

71 lines
1.6 KiB
Groovy

buildscript {
repositories {
jcenter()
mavenLocal()
}
dependencies {
classpath group: 'com.github.jruby-gradle',
name: 'jruby-gradle-plugin',
version: '0.1.3-SNAPSHOT'
}
}
plugins {
//id "com.github.jruby-gradle.base" version "0.1.2"
id "com.github.jruby-gradle.jar" version '0.1.1'
id "com.github.johnrengelman.shadow" version "1.1.2"
}
apply plugin: 'java'
import com.github.jrubygradle.JRubyExec
// There appear to be issues with 1.7.16:
// <https://gist.github.com/rtyler/dd1f1df58d4712a9e63d>
project.jruby.execVersion = '1.7.15'
dependencies {
compile group: 'org.jruby', name: 'jruby-complete', version: '1.7.15'
gems group: 'rubygems', name: 'protobuf', version: '3.0.+'
gems group: 'rubygems', name: 'concurrent-ruby', version: '0.7.+'
jrubyExec group: 'rubygems', name: 'rspec', version: '3.1.+'
}
configurations {
jrubyExec {
extendsFrom gems
}
}
jrubyJavaBootstrap {
jruby {
initScript = 'blick-agent'
}
}
// Pull the contents of lib and bin into the root of the created jar file
sourceSets {
main {
resources.srcDirs = ['lib', 'bin']
}
}
shadowJar {
baseName 'blick-agent'
exclude '*.sw*', '*.gitkeep', '*.md'
jruby {
// Use the default GEM installation directory
defaultGems()
defaultMainClass()
}
}
task spec(type: JRubyExec) {
group 'JRuby'
description 'Execute the RSpecs in JRuby'
jrubyArgs '-S', 'rspec'
scriptArgs '--color', '--order', 'random'
}
// vim: ft=groovy