-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
62 lines (50 loc) · 1.43 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
52
53
54
55
56
57
58
59
60
61
62
group 'com.sensetime.test'
apply plugin: 'java'
apply plugin: 'scala'
apply plugin: 'idea'
apply plugin: 'application'
mainClassName = 'org.apache.spark.jruby.REPLMain'
version '1.0-SNAPSHOT'
task wrapper(type: Wrapper) {
gradleVersion = '2.11'
}
repositories {
maven { url 'http://ci.jruby.org/snapshots/maven/'}
mavenCentral()
}
sourceSets {
main {
scala {
srcDirs = ['src/main/scala', 'src/main/java']
}
java {
srcDirs = []
}
}
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
compile group: 'org.apache.spark', name: 'spark-core_2.10', version: '1.6.0'
compile group: 'jline', name: 'jline', version: '2.11'
compile files('libs/jruby-complete-9.1.0.0-SNAPSHOT.jar')
//compile group
// compile group: 'org.jruby', name: 'jruby-core', version: '9.0.4.0'
// compile group: 'org.jruby', name: 'jruby-core', version: '9.1.0.0-SNAPSHOT'
}
build << {
File script = file('start.sh')
script.withPrintWriter {
it.println '#!/bin/sh'
it.println "java -cp ${getRuntimeClasspath()} org.jruby.JarBootstrapMain \"\$@\""
}
// make it executable
ant.chmod(file: script.absolutePath, perm: 'u+x')
}
jar {
manifest {
attributes "Main-Class": 'org.apache.spark.jruby.REPLMain'
}
}
String getRuntimeClasspath() {
sourceSets.main.runtimeClasspath.collect { it.absolutePath }.join(':')
}