Upgrade to a released version of the jar plugin and clean up the build.gradle
This is still mostly for integration testing and demo purposes though
This commit is contained in:
parent
acd97c228e
commit
647a32dd10
|
@ -6,3 +6,5 @@ doc/
|
|||
.yardoc/
|
||||
build/
|
||||
.gradle/
|
||||
.idea/
|
||||
*.iml
|
||||
|
|
2
.rspec
2
.rspec
|
@ -1 +1 @@
|
|||
--order random --fail-fast --format doc --color
|
||||
--order random --fail-fast --format progress --color --backtrace
|
||||
|
|
|
@ -9,7 +9,7 @@ s = Blick::Agent::Scheduler.new
|
|||
s.run!
|
||||
|
||||
$should_die = false
|
||||
puts 'Our heartbeat is now running'
|
||||
puts "Our heartbeat is now running on JRuby: #{JRUBY_VERSION}"
|
||||
|
||||
until $should_die do
|
||||
sleep 1
|
||||
|
|
82
build.gradle
82
build.gradle
|
@ -1,34 +1,56 @@
|
|||
plugins {
|
||||
id "com.github.jruby-gradle.jar" version "0.1.2"
|
||||
id "com.github.jruby-gradle.base" version "0.1.5"
|
||||
id "com.github.johnrengelman.shadow" version "1.1.2"
|
||||
}
|
||||
apply plugin: 'java'
|
||||
buildscript {
|
||||
repositories {
|
||||
jcenter()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.github.jruby-gradle:jruby-gradle-jar-plugin:1.0.3'
|
||||
//classpath 'com.github.jruby-gradle:jruby-gradle-jar-plugin:1.0.2'
|
||||
}
|
||||
|
||||
}
|
||||
apply plugin: 'com.github.jruby-gradle.jar'
|
||||
import com.github.jrubygradle.JRubyExec
|
||||
|
||||
version = 1.0
|
||||
|
||||
jruby.defaultRepositories = false
|
||||
jruby.defaultVersion = '1.7.19'
|
||||
|
||||
repositories {
|
||||
maven { url 'http://rubygems-jrubygradle.rhcloud.com/proxy/maven/releases/' }
|
||||
jcenter()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
gems group: 'rubygems', name: 'protobuf', version: '3.0.+'
|
||||
gems group: 'rubygems', name: 'concurrent-ruby', version: '0.7.+'
|
||||
gems group: 'rubygems', name: 'rake', version: '10.3.+'
|
||||
|
||||
jrubyExec group: 'rubygems', name: 'rspec', version: '3.1.+'
|
||||
jrubyExec group: 'rubygems', name: 'rspec-its', version: '1.+'
|
||||
jrubyExec group: 'rubygems', name: 'pry', version: '0.10.+'
|
||||
jrubyExec 'rubygems:rspec:3.3.0'
|
||||
jrubyExec 'rubygems:rspec-its:1.2.0+'
|
||||
jrubyExec 'rubygems:pry:0.10.0+'
|
||||
}
|
||||
|
||||
configurations {
|
||||
jrubyExec {
|
||||
extendsFrom gems
|
||||
}
|
||||
jrubyExec.extendsFrom gems
|
||||
jrubyJar.extendsFrom gems
|
||||
}
|
||||
|
||||
jrubyJavaBootstrap {
|
||||
jruby {
|
||||
initScript = 'bin/rake'
|
||||
}
|
||||
task spec(type: JRubyExec) {
|
||||
group 'JRuby'
|
||||
description 'Execute the RSpecs in JRuby'
|
||||
script 'rspec'
|
||||
inputs.source fileTree('spec').include('**/*.rb'), fileTree('lib').include('**/*.rb')
|
||||
}
|
||||
|
||||
jrubyJar {
|
||||
initScript "${projectDir}/bin/blick-agent"
|
||||
from 'lib'
|
||||
dependsOn spec
|
||||
}
|
||||
assemble.dependsOn jrubyJar
|
||||
|
||||
// Pull the contents of lib and bin into the root of the created jar file
|
||||
sourceSets {
|
||||
main {
|
||||
|
@ -36,32 +58,4 @@ sourceSets {
|
|||
}
|
||||
}
|
||||
|
||||
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'
|
||||
script 'rspec'
|
||||
}
|
||||
|
||||
// XXX: Currently this does not work properly because stdin is not being
|
||||
// delegated properly
|
||||
task console(type: JRubyExec) {
|
||||
group 'JRuby'
|
||||
description 'Execute a Pry-based console in JRuby'
|
||||
jrubyArgs '-S', 'pry'
|
||||
scriptArgs '-I', './lib'
|
||||
standardInput System.in
|
||||
standardOutput System.out
|
||||
}
|
||||
|
||||
// vim: ft=groovy
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
org.gradle.daemon=true
|
|
@ -1,6 +1,6 @@
|
|||
#Tue Sep 02 22:11:10 PDT 2014
|
||||
#Sun Apr 19 19:09:11 PDT 2015
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-all.zip
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
require 'singleton'
|
||||
|
||||
require 'blick/transport'
|
||||
|
||||
module Blick
|
||||
|
|
Loading…
Reference in New Issue