-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
110 lines (93 loc) · 2.6 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
/*
Project <PROJECT_NAME>
Gradle build file for JaCaMo Applications
<DATE>
*/
defaultTasks 'run'
apply plugin: 'java'
apply plugin: 'eclipse'
version '1.0'
group 'org.jacamo'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
maven { url "http://jacamo.sourceforge.net/maven2" }
maven { url "https://raw.github.com/jacamo-lang/mvn-repo/master" }
maven { url "https://jade.tilab.com/maven/" }
flatDir {
dirs 'lib'
}
}
dependencies {
compile group: 'org.jacamo', name: 'jacamo', version: '0.7'
compile group: 'org.glassfish.jersey.core', name: 'jersey-client', version: '2.31'
compile group: 'org.glassfish.jersey.media', name: 'jersey-media-json-jackson', version: '2.31'
compile group: 'org.glassfish.jersey.inject', name: 'jersey-hk2', version: '2.31'
}
sourceSets {
main {
java {
srcDir 'src/env'
srcDir 'src/agt'
srcDir 'src/org'
srcDir 'src/java'
}
resources {
srcDir 'src/resources'
}
}
}
task run (type: JavaExec, dependsOn: 'classes') {
group ' JaCaMo'
description 'runs the JaCaMo application'
doFirst {
mkdir 'log'
}
main 'jacamo.infra.JaCaMoLauncher'
args 'jacamoRL.jcm'
classpath sourceSets.main.runtimeClasspath
}
task runPythonAgent(type:Exec) {
group ' Python'
description 'runs the python agent'
workingDir 'src/python/agt'
commandLine 'python3', 'tf_agent_rest.py'
}
task runPythonEnv(type:Exec) {
group ' Python'
description 'runs the python environment'
workingDir 'src/python/env'
commandLine 'python3', 'tf_env_rest.py'
}
task uberJar(type: Jar, dependsOn: 'classes') {
group ' JaCaMo'
description 'creates a single runnable jar file with all dependencies'
manifest {
attributes 'Main-Class': 'jacamo.infra.JaCaMoLauncher'
}
baseName = 'jacamoRL' // the name must start with jacamo so that jacamo...jar is found in the classpath
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
from (project.projectDir.absolutePath) {
include '**/*.asl'
include '**/*.xml'
include '**/*.jcm'
include '*.properties'
}
from (project.buildDir.absolutePath + '/jcm') {
include '**/*'
}
with jar
doFirst {
copy {
from 'jacamoRL.jcm'
rename 'jacamoRL.jcm','default.jcm'
into project.buildDir.absolutePath + '/jcm'
}
}
}
clean {
delete 'bin'
delete 'build'
delete 'log'
}