-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
181 lines (152 loc) · 5.49 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
174
175
176
177
178
179
180
181
plugins {
id 'java'
id 'application'
id 'org.openjfx.javafxplugin' version '0.0.10'
id 'com.google.protobuf' version '0.8.17'
id 'org.beryx.runtime' version '1.12.7'
}
javafx {
version = JavaVersion.VERSION_11
modules = ['javafx.controls', 'javafx.fxml', 'javafx.swing']
}
group 'ecdar'
if (project.hasProperty('ecdarVersion')) {
version = project.ecdarVersion
} else {
version = '2.3'
}
mainClassName = 'ECDAR'
sourceCompatibility = JavaVersion.VERSION_11
configurations.implementation.setCanBeResolved(true)
//create a single Jar with all dependencies
task fatJar(type: Jar) {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
manifest {
attributes 'Implementation-Title': 'Gradle Jar File Example',
'Implementation-Version': version,
'Main-Class': mainClassName
}
baseName = project.name
from { configurations.implementation.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
repositories {
mavenCentral()
}
def grpcVersion = '1.41.0' // CURRENT_GRPC_VERSION
def protobufVersion = '3.17.2'
def protocVersion = protobufVersion
dependencies {
implementation fileTree(dir: 'lib', include: ['*.jar'])
implementation 'com.jfoenix:jfoenix:9.0.10'
implementation group: 'de.codecentric.centerdevice', name: 'javafxsvg', version: '1.3.0'
implementation 'org.kordamp.ikonli:ikonli-core:12.3.1'
implementation 'org.kordamp.ikonli:ikonli-material-pack:12.3.1'
implementation 'org.kordamp.ikonli:ikonli-javafx:12.3.1'
implementation 'com.google.code.gson:gson:2.8.8'
implementation 'org.springframework:spring-core:5.3.10' // Used for evaluating expressions
implementation 'org.springframework:spring-expression:5.3.10' // Used for evaluating expressions
implementation 'com.bpodgursky:jbool_expressions:1.23'
// Used for converting boolean expressions to disjunctive normal form
implementation 'org.fxmisc.richtext:richtextfx:0.10.6'
implementation 'com.google.guava:guava:31.0.1-jre'
implementation 'org.apache.commons:commons-lang3:3.12.0'
//GRPC:
implementation "com.google.protobuf:protobuf-java:3.18.0"
implementation "io.grpc:grpc-protobuf:${grpcVersion}"
implementation "io.grpc:grpc-stub:${grpcVersion}"
compileOnly "org.apache.tomcat:annotations-api:6.0.53"
// examples/advanced need this for JsonFormat
implementation "com.google.protobuf:protobuf-java-util:${protobufVersion}"
runtimeOnly "io.grpc:grpc-netty-shaded:${grpcVersion}"
testImplementation "io.grpc:grpc-testing:${grpcVersion}"
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.0'
testImplementation 'org.testfx:testfx-junit:4.0.15-alpha'
testImplementation 'org.testfx:openjfx-monocle:jdk-12.0.1+2'
testImplementation 'org.mockito:mockito-core:3.12.4'
testImplementation 'org.mockito:mockito-junit-jupiter:4.8.0'
}
test {
useJUnitPlatform { includeEngines 'junit-jupiter' }
filter {
excludeTestsMatching "ecdar.ui.*"
}
}
tasks.register('uiTest', Test) {
filter {
includeTestsMatching "ecdar.ui.*"
}
useJUnitPlatform { includeEngines 'junit-jupiter' }
// Properties needed for headless UI test execution
systemProperty 'testfx.robot', 'glass'
systemProperty 'glass.platform', 'Monocle'
systemProperty 'monocle.platform', 'Headless'
systemProperty 'prism.order', 'sw'
systemProperty 'testfx.setup.timeout', '2500'
systemProperty 'java.awt.headless', 'true'
systemProperty 'testfx.headless', 'true'
systemProperty 'prism.text', 't2k'
}
runtime {
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
modules = [
'javafx.base',
'java.desktop',
'javafx.graphics',
'javafx.controls',
'javafx.fxml',
'java.prefs',
'javafx.swing',
'java.xml',
'jdk.unsupported',
'java.scripting',
'jdk.unsupported.desktop',
'java.datatransfer',
'java.logging',
'java.sql',
'jdk.jfr']
launcher {
jvmArgs = ['-Dlog4j.configurationFile=./log4j2.xml']
}
targetPlatform("linux_64", {
jdkHome = jdkDownload("https://cdn.azul.com/zulu/bin/zulu11.60.19-ca-fx-jdk11.0.17-linux_x64.tar.gz") {
archiveExtension = "tar.gz"
}
})
targetPlatform("win_64", {
jdkHome = jdkDownload("https://cdn.azul.com/zulu/bin/zulu11.60.19-ca-fx-jdk11.0.17-win_x64.zip") {
archiveExtension = "zip"
}
})
targetPlatform("macOS_x86") {
jdkHome = jdkDownload("https://cdn.azul.com/zulu/bin/zulu11.60.19-ca-fx-jdk11.0.17-macosx_x64.tar.gz") {
archiveExtension = "tar.gz"
}
}
targetPlatform("macOS_arm") {
jdkHome = jdkDownload("https://cdn.azul.com/zulu/bin/zulu11.60.19-ca-fx-jdk11.0.17-macosx_aarch64.tar.gz") {
archiveExtension = "tar.gz"
}
}
}
protobuf {
protoc { artifact = "com.google.protobuf:protoc:${protocVersion}" }
plugins {
grpc { artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}" }
}
generateProtoTasks {
all()*.plugins { grpc {} }
}
}
sourceSets {
generated {
java.srcDir 'src/main/java/'
}
main {
java {
srcDirs 'build/generated/source/proto/main/grpc'
srcDirs 'build/generated/source/proto/main/java'
}
}
}