-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
51 lines (43 loc) · 1.38 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
apply plugin: 'idea'
apply plugin: 'java'
repositories {
ivy {
url 'http://gemjars.org:8080'
layout 'pattern', {
artifact 'jars/[organization]/[module]-[revision].[ext]'
ivy 'ivys/[organization]/ivy-[module]-[revision].[ext]'
}
}
mavenCentral()
}
dependencies {
compile 'org.projectlombok:lombok:0.10.4'
compile 'org.rubygems:activesupport:3.1.0'
testCompile 'org.jruby:jruby-core:1.6.7'
testCompile 'org.jruby:jruby-common:1.6.7'
testCompile 'org.jruby:jruby-stdlib:1.6.7'
testCompile 'org.rubygems:rspec:2.10.0'
testCompile 'org.rubygems:ci_reporter:1.7.0'
}
class JRubyExec extends JavaExec {
public JRubyExec() {
setMain('org.jruby.Main')
}
}
def mainClasspath = files("$projectDir/src/main/ruby/lib")
def sourcePath = "$projectDir/src"
def reportsPath = "$buildDir/reports"
task(spec, type: JRubyExec, dependsOn: jar) {
inputs.dir files(sourcePath)
outputs.dir files(reportsPath)
classpath = configurations.testRuntime + runtimeClasspath + mainClasspath
environment CI_REPORTS: reportsPath
args 'classpath:bin/rspec',
'-r', 'rubygems',
'-r', 'ci/reporter/rake/rspec_loader',
'-r', "$projectDir/src/test/ruby/spec/spec_helper.rb",
'-f', 'CI::Reporter::RSpec',
'-c',
'src/test'
}
test.dependsOn << spec