-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathbuild.gradle
49 lines (43 loc) · 1.15 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
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
println "Gradle "+gradle.gradleVersion
println "Java "+org.gradle.internal.jvm.Jvm.current()
repositories {
maven {
url "https://maven.java.net/content/repositories/public/"
}
}
dependencies {
compile "com.oracle:avatar-js:0.10.25-SNAPSHOT"
compile "com.oracle:libavatar-js-win-x64:0.10.25-SNAPSHOT"
}
task copyLibs(type: Copy) {
from configurations.compile
into 'lib'
//TODO files need to be renamed
}
sourceSets {
main {
java {
srcDir 'src'
}
resources {
srcDir 'src'
}
}
}
//http://stackoverflow.com/questions/23148214/gradle-task-to-run-nashorn-javascript
task runHelloWorld1(type: Exec) {
println 'runHelloWorld1'
commandLine 'java', '-Djava.library.path=lib', '-jar', 'lib/avatar-js.jar', 'helloWorld.js'
println 'runHelloWorld1 finished'
}
task runHelloWorld2(type: JavaExec) {
println 'runHelloWorld2'
args 'helloWorld.js'
main 'com.oracle.avatar.js.Server'
systemProperties 'java.library.path':'lib'
classpath 'lib/avatar-js.jar'
println 'runHelloWorld2 finished'
}