-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
173 lines (144 loc) · 4.75 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
/*
* This build file was auto generated by running the Gradle 'init' task
* by 'Philipp' at '08.11.16 16:32' with Gradle 3.1
*
* This generated file contains a sample Java project to get you started.
* For more details take a look at the Java Quickstart chapter in the Gradle
* user guide available at https://docs.gradle.org/3.1/userguide/tutorial_java_projects.html
*/
plugins {
id 'com.github.jacobono.jaxb' version '1.3.5'
id 'com.github.kt3k.coveralls' version '2.8.2'
id 'net.saliman.cobertura' version '2.3.1'
}
apply plugin: 'application'
apply plugin: 'antlr'
group = "edu.kit.iti.formal"
version = "1.4.0-beta"
compileJava.options.encoding = 'UTF-8'
compileJava.dependsOn(xjc)
sourceSets {
main {
java {
srcDirs = [
'src/main/java',
'build/generated-src/jaxb',
'build/generated-src/antlr/main'
]
}
}
}
javadoc {
failOnError false
options.charSet = 'UTF-8'
}
// In this section you declare where to find the dependencies of your project
repositories {
// Use 'jcenter' for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
mavenCentral()
maven {
url "http://formal.iti.kit.edu/maven2/"
}
//mavenLocal()
}
dependencies {
compile 'org.apache.commons:commons-collections4:4.0'
compile 'de.tu-dresden.inf.lat.jsexp:jsexp:0.2.2'
compile 'org.apache.commons:commons-lang3:3.1'
compile 'commons-io:commons-io:2.5'
compile 'com.google.code.gson:gson:2.8.0'
compile 'org.fxmisc.richtext:richtextfx:0.6.10'
compile 'org.antlr:antlr4-runtime:4.7'
compile 'edu.kit.iti.formal:iec61131lang:0.1.15-SNAPSHOT'
compile group: 'de.jensd', name: 'fontawesomefx', version: '8.9'
compile group: 'com.sun.xml.bind', name: 'jaxb-impl', version: '2.2.3-1'
compile 'org.slf4j:slf4j-jdk14:1.8.0-alpha2'
compile 'org.fxmisc.cssfx:cssfx:1.0.0'
compile 'org.controlsfx:controlsfx:8.40.13'
testCompile "junit:junit:4.12"
antlr 'org.antlr:antlr4:4.7'
jaxb 'com.sun.xml.bind:jaxb-xjc:2.2.7-b41'
jaxb 'com.sun.xml.bind:jaxb-impl:2.2.7-b41'
jaxb 'javax.xml.bind:jaxb-api:2.2.7'
testCompile "junit:junit:4.12"
testCompile group: 'com.googlecode.junit-toolbox', name: 'junit-toolbox', version: '2.2'
testCompile "org.testfx:testfx-core:4.0.+"
testCompile "org.testfx:testfx-junit:4.0.+"
testCompile "org.mockito:mockito-core:2.4.0"
testCompile group: 'org.powermock', name: 'powermock-module-junit4', version: '1.7.0RC2'
testCompile group: 'org.powermock', name: 'powermock-api-mockito2', version: '1.7.0RC2'
}
System.setProperty('javax.xml.accessExternalSchema', 'file')
def getVersionName = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-parse', '--short', 'HEAD'
standardOutput = stdout
}
return stdout.toString().trim()
}
jaxb {
xjc {
xsdDir "src/main/resources/fileFormats/"
destinationDir "build/generated-src/jaxb/"
args = ["-encoding", "UTF-8"]
}
}
generateGrammarSource {
maxHeapSize = "64m"
arguments += ["-visitor", "-long-messages"]
}
mainClassName = "edu.kit.iti.formal.stvs.StvsApplication"
ext.sharedManifest = manifest {
attributes('Implementation-Title': 'StructuredText Verification Studio (stvs)',
'Implementation-Version': version,
'Specification-Version': getVersionName(),
"Main-Class": mainClassName)
}
jar {
manifest = project.manifest {
from sharedManifest
attributes(
'Class-Path': configurations.compile.collect {
it.getName()
}.join(' '))
}
}
task fatJar(type: Jar) {
manifest = project.manifest { from sharedManifest }
baseName = project.name + '-all'
from {
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}
with jar
}
test {
filter {
includeTestsMatching "edu.kit.iti.formal.stvs.model.*"
includeTestsMatching "edu.kit.iti.formal.stvs.logic.*"
}
useJUnit {
excludeCategories 'edu.kit.iti.formal.stvs.Performance'
excludeCategories 'edu.kit.iti.formal.stvs.Demo'
excludeCategories 'edu.kit.iti.formal.stvs.RandomTest'
}
testLogging {
showStandardStreams = true
}
}
task guiTest(type: Test) {
filter {
includeTestsMatching "edu.kit.iti.formal.stvs.view.*"
}
useJUnit {
excludeCategories 'edu.kit.iti.formal.stvs.Demo'
excludeCategories 'edu.kit.iti.formal.stvs.Performance'
}
testLogging {
showStandardStreams = true
}
}
// coverage
cobertura.coverageFormats = ['html', 'xml'] // coveralls plugin depends on xml format report