-
Notifications
You must be signed in to change notification settings - Fork 68
/
build.gradle
175 lines (141 loc) · 4.53 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
buildscript {
repositories {
gradlePluginPortal()
}
configurations.all {
resolutionStrategy.force 'net.java.dev.javacc:javacc:6.2'
}
}
plugins {
id "ca.coglinc.javacc" version "2.4.0"
id 'java'
id "kr.motd.sphinx" version "2.10.0"
}
apply plugin: 'base'
apply plugin: 'java'
apply plugin: 'checkstyle'
group 'fr.uga'
version '4.0.0'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
implementation group: 'com.googlecode.json-simple', name: 'json-simple', version: '1.1.1'
implementation group: 'org.apache.logging.log4j', name: 'log4j', version: '2.19.0'
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.19.0'
implementation group: 'org.openjdk.jol', name: 'jol-core', version: '0.9'
testImplementation group: 'junit', name: 'junit', version: '4.13'
implementation 'info.picocli:picocli:4.6.2'
annotationProcessor 'info.picocli:picocli-codegen:4.6.2'
}
compileJavacc {
arguments = [debug_parser: 'false'] // debug true to print the lexical tree
inputDirectory = file('src/main/java/fr/uga/pddl4j/parser/lexer/')
outputDirectory = file('src/main/java/fr/uga/pddl4j/parser/lexer/')
}
jjdoc {
inputDirectory = file('src/main/java/fr/uga/pddl4j/parser/lexer/')
outputDirectory = file('build/docs/PDDL4J_BNF')
arguments = [TEXT: 'false', ONE_TABLE: 'true']
}
// The following annotation processors were detected on the compile classpath:
// 'org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor'.
// Remove warning about log4j ProcessPlugin raised with --warning-mode=all
compileJava {
options.compilerArgs += '-proc:none'
options.compilerArgs += ["-Aproject=${project.group}/${project.name}"]
options.compilerArgs += '-Xlint:unchecked'
}
compileTestJava {
options.compilerArgs += '-proc:none'
options.compilerArgs += '-Xlint:unchecked'
}
sphinx {
// Change the source directory.
sourceDirectory = "docs/"
// Change the output directory.
configDirectory= "docs/"
builder = "html"
}
checkstyle {
toolVersion = "8.9"
}
jar {
duplicatesStrategy = 'include'
exclude('fr/uga/pddl4j/examples/**')
manifest {
attributes (
'Implementation-Title': 'PDDL4J',
'Implementation-Version' : archiveVersion,
'Built-By': 'Damien Pellier',
'Premain-Class': 'org.openjdk.jol.vm.InstrumentationSupport',
'Launcher-Agent-Class': 'org.openjdk.jol.vm.InstrumentationSupport$Installer'
)
}
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
}
clean{
delete 'build', 'out', fileTree(dir: "src/main/java/fr/uga/pddl4j/parser/lexer", exclude:"Lexer.jj")
}
javadoc {
failOnError false
title = "PDDL4J API Documentation"
options.setOverview("src/overview.html")
options.setWindowTitle("PDDL4J API Documentation");
options.showFromProtected()
excludeLexer(javadoc)
include("**/*.java")
}
checkstyleMain.onlyIf() { !project.hasProperty('noCheckStyle') }
checkstyleMain.doFirst() {
excludeLexer(checkstyleMain)
}
checkstyleMain.doLast() {
printCheckstyleVersion()
}
checkstyleTest.onlyIf() { !project.hasProperty('noCheckStyle') }
checkstyleTest.doFirst(){
excludeLexer(checkstyleTest)
}
checkstyleTest.doLast(){
printCheckstyleVersion()
}
test.onlyIf() { !project.hasProperty('noTest') }
test {
useJUnit()
// set heap size for the test JVM(s)
minHeapSize = "512m"
maxHeapSize = "4096m"
forkEvery = 1 // One new JVM for each test
testLogging {
showStandardStreams = true // Set to false to hid test output
exceptionFormat "full" // full to print stack
events "skipped", "failed", "passed"
}
// The set of Junit tests
scanForTestClasses = true
includes = [
'**/PDDLParserTest.class',
'**/HDDLParserTest.class',
//'**/ADLProblemInstantiationTest.class',
//'**/HTNProblemInstantiationTest.class',
//'**/TemporalProblemInstantiationTest.class',
'**/HSPTest.class',
'**/FFTest.class',
//'**/GSPTest.class',
'**/TFDTest.class',
'**/PFDTest.class'
]
}
defaultTasks 'clean', 'build', 'test'
// Exclude lexer source form task
def excludeLexer(task) {
task.exclude("**/lexer/**")
}
// Display the current version use by checkstyle plugin
def printCheckstyleVersion(){
println("Checkstyle version: "+checkstyle.toolVersion)
}