forked from Open-MBEE/exec-mdk-systems-reasoner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
482 lines (430 loc) · 36.3 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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
import java.time.LocalDateTime
import java.time.format.DateTimeFormatter
import java.util.stream.Collectors
import java.util.zip.ZipFile
String buildAccess = project.getProperties().getOrDefault('buildAccess', 'opensource')
String buildTag = project.getProperties().get('buildTag')
if (buildTag != null && !buildTag.isEmpty() && buildTag != version) {
throw new GradleException('Version mismatch.')
}
if (buildTag == null || buildTag.isEmpty() || project.getProperties().getOrDefault('artifactoryRepository', '').toLowerCase().contains('snapshot')) {
version += '-SNAPSHOT'
}
String buildNumber = project.hasProperty('buildNumber') ? project.getProperty('buildNumber') : System.currentTimeSeconds()
String timestamp = DateTimeFormatter.ofPattern("yyyy-MM-dd-HH:mm").format(LocalDateTime.now())
//String[] classpathLibraries = ['lib/patch.jar','lib/md.jar','lib/md_api.jar','lib/md_common.jar','lib/md_common_api.jar','lib/md_common_test.jar','lib/tw_common.jar','lib/tw_common_api.jar','lib/launcher.jar','lib/activation.jar','lib/annotation.jar','lib/batik.jar','lib/bridj-0.7.0.jar','lib/bundles/ch.qos.logback.classic_1.2.3.jar','lib/bundles/ch.qos.logback.core_1.2.3.jar','lib/bundles/cmof_1.4.0.201811041524/cmof14.jar','lib/bundles/cmof_1.4.0.201811041524/tas.jar','lib/bundles/com.esotericsoftware.kryo_2.22.0.201401231130.jar','lib/bundles/com.google.guava_18.0.0.jar','lib/bundles/com.nomagic.annotations_1.0.0/com.nomagic.annotation-1.0.jar','lib/bundles/com.nomagic.ci.binary_17.0.5.v20181104-1514.jar','lib/bundles/com.nomagic.ci.metamodel.project_17.0.5.v20181104-1514.jar','lib/bundles/com.nomagic.ci.persistence.local_17.0.5.v20181104-1514.jar','lib/bundles/com.nomagic.ci.persistence_17.0.5.v20181104-1514.jar','lib/bundles/com.nomagic.ci.services_17.0.5.v20181104-1514.jar','lib/bundles/com.nomagic.ci_17.0.5.v20181104-1514.jar','lib/bundles/com.nomagic.esi.api.messages_1.0.0.v20181030-1552.jar','lib/bundles/com.nomagic.esi.api_1.0.0.v20181030-1552.jar','lib/bundles/com.nomagic.esi.client.core_1.0.0.v20181030-1552.jar','lib/bundles/com.nomagic.esi.common_1.0.0.v20181030-1552.jar','lib/bundles/com.nomagic.esi.config_1.0.0.v20181030-1552.jar','lib/bundles/com.nomagic.esi.core.msg_1.0.0.v20181030-1552.jar','lib/bundles/com.nomagic.esi.emf_1.0.0.v20181030-1552.jar','lib/bundles/com.nomagic.esi.helper_1.0.0.v20181030-1552.jar','lib/bundles/com.nomagic.esi.net_1.0.0.v20181030-1552.jar','lib/bundles/com.nomagic.esi.serializer.akka_1.0.0.v20181030-1552.jar','lib/bundles/com.nomagic.esi.serializer_1.0.0.v20181030-1552.jar','lib/bundles/com.nomagic.esi.service.actorsystem_1.0.0.v20181030-1552.jar','lib/bundles/com.nomagic.esi.services_1.0.0.v20181030-1552.jar','lib/bundles/com.nomagic.esi.stream_1.0.0.v20181030-1552.jar','lib/bundles/com.nomagic.esi.supervisor_1.0.0.v20181030-1552.jar','lib/bundles/com.nomagic.magicdraw.ce_18.1.0.201811041524.jar','lib/bundles/com.nomagic.magicdraw.core.diagram_18.1.0.201811041524.jar','lib/bundles/com.nomagic.magicdraw.core.project.options_18.1.0.201811041524.jar','lib/bundles/com.nomagic.magicdraw.core_1.0.0.201811041524.jar','lib/bundles/com.nomagic.magicdraw.esi.binary.metamodel_18.1.0.201811041524.jar','lib/bundles/com.nomagic.magicdraw.esi.esiproject_18.1.0.201811041524.jar','lib/bundles/com.nomagic.magicdraw.esi.uuidmap_18.1.0.201811041524.jar','lib/bundles/com.nomagic.magicdraw.foundation_2.0.0.201811041524.jar','lib/bundles/com.nomagic.magicdraw.osgi.fragment_1.0.0.201811041524.jar','lib/bundles/com.nomagic.magicdraw.security_18.3.0.201811041524.jar','lib/bundles/com.nomagic.magicdraw.uml2_2.5.1.201811041524.jar','lib/bundles/com.nomagic.magicdraw_17.0.5.201811041524.jar','lib/bundles/com.teamdev.jxbrowser.chromium.internal.linux32_6.13.0.jar','lib/bundles/com.teamdev.jxbrowser.chromium.internal.linux64_6.13.0.jar','lib/bundles/com.teamdev.jxbrowser.chromium.internal.mac_6.13.0.jar','lib/bundles/com.teamdev.jxbrowser.chromium.internal.win32_6.13.0.jar','lib/bundles/com.teamdev.jxbrowser.chromium_6.13.0.jar','lib/bundles/com.typesafe.akka.actor_2.5.10.jar','lib/bundles/com.typesafe.akka.cluster.tools_2.5.10.jar','lib/bundles/com.typesafe.akka.cluster_2.5.10.jar','lib/bundles/com.typesafe.akka.osgi_2.5.10.jar','lib/bundles/com.typesafe.akka.protobuf_2.5.10.jar','lib/bundles/com.typesafe.akka.remote_2.5.10.jar','lib/bundles/com.typesafe.akka.slf4j_2.5.10.jar','lib/bundles/com.typesafe.akka.stream_2.5.10.jar','lib/bundles/com.typesafe.config_1.3.0.jar','lib/bundles/com.typesafe.sslconfig_0.2.2.jar','lib/bundles/de.schlichtherle.truezip_7.4.3.v20181104-1514/lib/truezip-driver-zip-7.4.3.jar','lib/bundles/de.schlichtherle.truezip_7.4.3.v20181104-1514/lib/truezip-kernel-7.4.3.jar','lib/bundles/gnu.trove_3.0.3/lib/trove-3.0.3.jar','lib/bundles/io.aeron.client_1.7.0.jar','lib/bundles/io.aeron.driver_1.7.0.jar','lib/bundles/io.dropwizard.metrics.core_3.1.2.jar','lib/bundles/io.dropwizard.metrics.graphite_3.1.2.jar','lib/bundles/io.netty.buffer_4.1.21.Final.jar','lib/bundles/io.netty.codec_4.1.21.Final.jar','lib/bundles/io.netty.common_4.1.21.Final.jar','lib/bundles/io.netty.handler_4.1.21.Final.jar','lib/bundles/io.netty.resolver_4.1.21.Final.jar','lib/bundles/io.netty.transport_4.1.21.Final.jar','lib/bundles/javax.jmi_1.0.0.201811041524/javax_jmi-1_0-fr.jar','lib/bundles/joda-time_2.9.1.jar','lib/bundles/lz4-java_1.3.0.jar','lib/bundles/org.agrona_0.9.12.jar','lib/bundles/org.apache.commons.codec_1.9.0.v20170208-1614.jar','lib/bundles/org.apache.commons.collections_3.2.1.jar','lib/bundles/org.apache.commons.compress_1.3.0.jar','lib/bundles/org.apache.commons.io_2.4.0.jar','lib/bundles/org.apache.commons.lang_2.6.0.v201404270220.jar','lib/bundles/org.apache.commons.logging_1.1.1.v201101211721.jar','lib/bundles/org.apache.felix.scr_2.0.10.v20170501-2007.jar','lib/bundles/org.apache.httpcomponents.httpclient_4.5.3.jar','lib/bundles/org.apache.httpcomponents.httpcore_4.4.6.v20170210-0925.jar','lib/bundles/org.apache.log4j_1.2.15.v201005080500.jar','lib/bundles/org.apache.servicemix.bundles.jsr305_2.0.1.1.jar','lib/bundles/org.apiguardian_1.0.0.v20170910-2246.jar','lib/bundles/org.eclipse.core.contenttype_3.6.0.v20170207-1037.jar','lib/bundles/org.eclipse.core.jobs_3.9.2.v20171030-1027.jar','lib/bundles/org.eclipse.core.runtime_3.13.0.v20170207-1030.jar','lib/bundles/org.eclipse.emf.common_2.13.0.v20170609-0707.jar','lib/bundles/org.eclipse.emf.ecore.xmi_2.13.0.v20170609-0707.jar','lib/bundles/org.eclipse.emf.ecore_2.13.0.v20170609-0707.jar','lib/bundles/org.eclipse.equinox.app_1.3.400.v20150715-1528.jar','lib/bundles/org.eclipse.equinox.common_3.9.0.v20170207-1454.jar','lib/bundles/org.eclipse.equinox.ds_1.5.0.v20170307-1429.jar','lib/bundles/org.eclipse.equinox.preferences_3.7.0.v20170126-2132.jar','lib/bundles/org.eclipse.equinox.registry_3.7.0.v20170222-1344.jar','lib/bundles/org.eclipse.osgi.services_3.6.0.v20170228-1906.jar','lib/bundles/org.eclipse.osgi.util_3.4.0.v20170111-1608.jar','lib/bundles/org.eclipse.osgi_3.12.50.v20170928-1321.jar','lib/bundles/org.eclipse.uml2.common_1.5.0.v200905041045.jar','lib/bundles/org.hamcrest.core_1.3.0.v201303031735.jar','lib/bundles/org.jboss.netty_3.10.6.Final.jar','lib/bundles/org.json_1.0.0.255610281323.jar','lib/bundles/org.junit.jupiter.api_5.0.0.v20170910-2246.jar','lib/bundles/org.junit.jupiter.params_5.0.0.v20170910-2246.jar','lib/bundles/org.junit.platform.commons_1.0.0.v20170910-2246.jar','lib/bundles/org.junit_4.12.0.v201504281640/junit.jar','lib/bundles/org.opentest4j_1.0.0.v20170910-2246.jar','lib/bundles/org.reactivestreams.reactive-streams_1.0.2.jar','lib/bundles/org.scala-lang.modules.scala-java8-compat_0.8.0.jar','lib/bundles/org.scala-lang.modules.scala-parser-combinators_1.0.4.jar','lib/bundles/org.scala-lang.scala-library_2.12.4.v20171010-220511-VFINAL-c2a5883.jar','lib/bundles/org.uncommons.maths_1.2.2.201301151508/lib/uncommons-maths-1.2.2a.jar','lib/bundles/slf4j.api_1.7.25.jar','lib/com.nomagic.osgi.launcher-17.0.5-SNAPSHOT.jar','lib/commons-compress-1.3.jar','lib/commons-httpclient-3.1.jar','lib/commons-logging-1.0.4.jar','lib/concurrent.jar','lib/EccpressoAll.jar','lib/ehcache-2.10.1.jar','lib/flexlm.jar','lib/graphics/clibwrapper_jiio.jar','lib/graphics/freehep-base.jar','lib/graphics/freehep-graphics2d.jar','lib/graphics/freehep-graphicsio-emf.jar','lib/graphics/freehep-graphicsio-ps.jar','lib/graphics/freehep-graphicsio.jar','lib/graphics/jai_imageio.jar','lib/gson-2.2.4.jar','lib/HTMLEditorLight.jar','lib/hunspell-bridj-1.0.5-SNAPSHOT.jar','lib/javassist.jar','lib/jhall.jar','lib/jide-action.jar','lib/jide-charts.jar','lib/jide-common.jar','lib/jide-components.jar','lib/jide-diff.jar','lib/jide-dock.jar','lib/jide-editor.jar','lib/jide-gantt.jar','lib/jide-grids.jar','lib/jide-shortcut.jar','lib/jimi.jar','lib/jna.jar','lib/jnp-client.jar','lib/jsr250-api-1.0.jar','lib/jsr305.jar','lib/jtidy.jar','lib/JUnitParams-1.0.1.jar','lib/lucene-analyzers-common-4.10.3.jar','lib/lucene-core-4.10.3.jar','lib/poi-3.14-20160307.jar','lib/poi-ooxml-3.14-20160307.jar','lib/poi-ooxml-schemas-3.14-20160307.jar','lib/webservice/axis-config.jar','lib/webservice/axis.jar','lib/webservice/commons-discovery-0.2.jar','lib/webservice/jaxrpc.jar','lib/webservice/mdserviceclient.jar','lib/webservice/rsclient.jar','lib/webservice/wsdl4j-1.5.1.jar','lib/xalan.jar','lib/xmlbeans-2.6.0.jar','lib/y.jar']
String[] classpathLibraries = ['lib/patch.jar','lib/md.jar','lib/md_api.jar','lib/md_common.jar','lib/md_common_api.jar','lib/md_common_test.jar','lib/tw_common.jar','lib/tw_common_api.jar','lib/launcher.jar','lib/activation.jar','lib/annotation.jar','lib/batik.jar','lib/brand.jar','lib/brand_api.jar','lib/bridj-0.7.0.jar','lib/bundles/ch.qos.logback.classic_1.2.3.jar','lib/bundles/ch.qos.logback.core_1.2.3.jar','lib/bundles/cmof_1.4.0.201903082028/cmof14.jar','lib/bundles/cmof_1.4.0.201903082028/tas.jar','lib/bundles/com.esotericsoftware.kryo_2.22.0.201401231130.jar','lib/bundles/com.google.guava_18.0.0.jar','lib/bundles/com.nomagic.annotations_1.0.0/com.nomagic.annotation-1.0.jar','lib/bundles/com.nomagic.ci.binary_17.0.5.v20190308-2012.jar','lib/bundles/com.nomagic.ci.metamodel.project_17.0.5.v20190308-2012.jar','lib/bundles/com.nomagic.ci.persistence.local_17.0.5.v20190308-2012.jar','lib/bundles/com.nomagic.ci.persistence_17.0.5.v20190308-2012.jar','lib/bundles/com.nomagic.ci.services_17.0.5.v20190308-2012.jar','lib/bundles/com.nomagic.ci_17.0.5.v20190308-2012.jar','lib/bundles/com.nomagic.esi.api.messages_1.0.0.v20190306-1144.jar','lib/bundles/com.nomagic.esi.api_1.0.0.v20190306-1144.jar','lib/bundles/com.nomagic.esi.client.core_1.0.0.v20190306-1144.jar','lib/bundles/com.nomagic.esi.common_1.0.0.v20190306-1144.jar','lib/bundles/com.nomagic.esi.config_1.0.0.v20190306-1144.jar','lib/bundles/com.nomagic.esi.core.msg_1.0.0.v20190306-1144.jar','lib/bundles/com.nomagic.esi.emf_1.0.0.v20190306-1144.jar','lib/bundles/com.nomagic.esi.helper_1.0.0.v20190306-1144.jar','lib/bundles/com.nomagic.esi.net_1.0.0.v20190306-1144.jar','lib/bundles/com.nomagic.esi.serializer.akka_1.0.0.v20190306-1144.jar','lib/bundles/com.nomagic.esi.serializer_1.0.0.v20190306-1144.jar','lib/bundles/com.nomagic.esi.service.actorsystem_1.0.0.v20190306-1144.jar','lib/bundles/com.nomagic.esi.services_1.0.0.v20190306-1144.jar','lib/bundles/com.nomagic.esi.stream_1.0.0.v20190306-1144.jar','lib/bundles/com.nomagic.esi.supervisor_1.0.0.v20190306-1144.jar','lib/bundles/com.nomagic.magicdraw.ce_18.1.0.201903082028.jar','lib/bundles/com.nomagic.magicdraw.core.diagram_18.1.0.201903082028.jar','lib/bundles/com.nomagic.magicdraw.core.project.options_18.1.0.201903082028.jar','lib/bundles/com.nomagic.magicdraw.core_1.0.0.201903082028.jar','lib/bundles/com.nomagic.magicdraw.esi.binary.metamodel_18.1.0.201903082028.jar','lib/bundles/com.nomagic.magicdraw.esi.esiproject_18.1.0.201903082028.jar','lib/bundles/com.nomagic.magicdraw.esi.uuidmap_18.1.0.201903082028.jar','lib/bundles/com.nomagic.magicdraw.foundation_2.0.0.201903082028.jar','lib/bundles/com.nomagic.magicdraw.osgi.fragment_1.0.0.201903082028.jar','lib/bundles/com.nomagic.magicdraw.security_18.3.0.201903082028.jar','lib/bundles/com.nomagic.magicdraw.uml2_2.5.1.201903082028.jar','lib/bundles/com.nomagic.magicdraw_17.0.5.201903082028.jar','lib/bundles/com.teamdev.jxbrowser.chromium.internal.linux64_6.22.0.jar','lib/bundles/com.teamdev.jxbrowser.chromium.internal.mac_6.22.0.jar','lib/bundles/com.teamdev.jxbrowser.chromium.internal.win32_6.22.0.jar','lib/bundles/com.teamdev.jxbrowser.chromium.internal.win64_6.22.0.jar','lib/bundles/com.teamdev.jxbrowser.chromium_6.22.0.jar','lib/bundles/com.typesafe.akka.actor_2.5.10.jar','lib/bundles/com.typesafe.akka.cluster.tools_2.5.10.jar','lib/bundles/com.typesafe.akka.cluster_2.5.10.jar','lib/bundles/com.typesafe.akka.osgi_2.5.10.jar','lib/bundles/com.typesafe.akka.protobuf_2.5.10.jar','lib/bundles/com.typesafe.akka.remote_2.5.10.jar','lib/bundles/com.typesafe.akka.slf4j_2.5.10.jar','lib/bundles/com.typesafe.akka.stream_2.5.10.jar','lib/bundles/com.typesafe.config_1.3.0.jar','lib/bundles/com.typesafe.sslconfig_0.2.2.jar','lib/bundles/de.schlichtherle.truezip_7.4.3.v20190308-2012/lib/truezip-driver-zip-7.4.3.jar','lib/bundles/de.schlichtherle.truezip_7.4.3.v20190308-2012/lib/truezip-kernel-7.4.3.jar','lib/bundles/gnu.trove_3.0.3/lib/trove-3.0.3.jar','lib/bundles/io.aeron.client_1.7.0.jar','lib/bundles/io.aeron.driver_1.7.0.jar','lib/bundles/io.dropwizard.metrics.core_3.1.2.jar','lib/bundles/io.dropwizard.metrics.graphite_3.1.2.jar','lib/bundles/io.netty.buffer_4.1.21.Final.jar','lib/bundles/io.netty.codec_4.1.21.Final.jar','lib/bundles/io.netty.common_4.1.21.Final.jar','lib/bundles/io.netty.handler_4.1.21.Final.jar','lib/bundles/io.netty.resolver_4.1.21.Final.jar','lib/bundles/io.netty.transport_4.1.21.Final.jar','lib/bundles/javax.jmi_1.0.0.201903082028/javax_jmi-1_0-fr.jar','lib/bundles/joda-time_2.9.1.jar','lib/bundles/lz4-java_1.3.0.jar','lib/bundles/org.agrona_0.9.12.jar','lib/bundles/org.apache.commons.codec_1.9.0.v20170208-1614.jar','lib/bundles/org.apache.commons.collections_3.2.1.jar','lib/bundles/org.apache.commons.compress_1.3.0.jar','lib/bundles/org.apache.commons.io_2.4.0.jar','lib/bundles/org.apache.commons.lang_2.6.0.v201404270220.jar','lib/bundles/org.apache.commons.logging_1.1.1.v201101211721.jar','lib/bundles/org.apache.felix.scr_2.0.10.v20170501-2007.jar','lib/bundles/org.apache.httpcomponents.httpclient_4.5.3.jar','lib/bundles/org.apache.httpcomponents.httpcore_4.4.6.v20170210-0925.jar','lib/bundles/org.apache.log4j_1.2.15.v201005080500.jar','lib/bundles/org.apache.servicemix.bundles.jsr305_2.0.1.1.jar','lib/bundles/org.apiguardian_1.0.0.v20170910-2246.jar','lib/bundles/org.eclipse.core.contenttype_3.6.0.v20170207-1037.jar','lib/bundles/org.eclipse.core.jobs_3.9.2.v20171030-1027.jar','lib/bundles/org.eclipse.core.runtime_3.13.0.v20170207-1030.jar','lib/bundles/org.eclipse.emf.common_2.13.0.v20170609-0707.jar','lib/bundles/org.eclipse.emf.ecore.xmi_2.13.0.v20170609-0707.jar','lib/bundles/org.eclipse.emf.ecore_2.13.0.v20170609-0707.jar','lib/bundles/org.eclipse.equinox.app_1.3.400.v20150715-1528.jar','lib/bundles/org.eclipse.equinox.common_3.9.0.v20170207-1454.jar','lib/bundles/org.eclipse.equinox.ds_1.5.0.v20170307-1429.jar','lib/bundles/org.eclipse.equinox.preferences_3.7.0.v20170126-2132.jar','lib/bundles/org.eclipse.equinox.registry_3.7.0.v20170222-1344.jar','lib/bundles/org.eclipse.osgi.services_3.6.0.v20170228-1906.jar','lib/bundles/org.eclipse.osgi.util_3.4.0.v20170111-1608.jar','lib/bundles/org.eclipse.osgi_3.12.50.v20170928-1321.jar','lib/bundles/org.eclipse.uml2.common_1.5.0.v200905041045.jar','lib/bundles/org.hamcrest.core_1.3.0.v201303031735.jar','lib/bundles/org.jboss.netty_3.10.6.Final.jar','lib/bundles/org.json_1.0.0.255610281323.jar','lib/bundles/org.junit.jupiter.api_5.0.0.v20170910-2246.jar','lib/bundles/org.junit.jupiter.params_5.0.0.v20170910-2246.jar','lib/bundles/org.junit.platform.commons_1.0.0.v20170910-2246.jar','lib/bundles/org.junit_4.12.0.v201504281640/junit.jar','lib/bundles/org.opentest4j_1.0.0.v20170910-2246.jar','lib/bundles/org.reactivestreams.reactive-streams_1.0.2.jar','lib/bundles/org.scala-lang.modules.scala-java8-compat_0.8.0.jar','lib/bundles/org.scala-lang.modules.scala-parser-combinators_1.0.4.jar','lib/bundles/org.scala-lang.scala-library_2.12.4.v20171010-220511-VFINAL-c2a5883.jar','lib/bundles/org.uncommons.maths_1.2.2.201301151508/lib/uncommons-maths-1.2.2a.jar','lib/bundles/slf4j.api_1.7.25.jar','lib/com.nomagic.osgi.launcher-17.0.5-SNAPSHOT.jar','lib/commons-compress-1.3.jar','lib/commons-httpclient-3.1.jar','lib/commons-logging-1.0.4.jar','lib/concurrent.jar','lib/EccpressoAll.jar','lib/ehcache-2.10.1.jar','lib/flexlm.jar','lib/graphics/clibwrapper_jiio.jar','lib/graphics/freehep-base.jar','lib/graphics/freehep-graphics2d.jar','lib/graphics/freehep-graphicsio-emf.jar','lib/graphics/freehep-graphicsio-ps.jar','lib/graphics/freehep-graphicsio.jar','lib/graphics/jai_imageio.jar','lib/gson-2.2.4.jar','lib/HTMLEditorLight.jar','lib/hunspell-bridj-1.0.5-SNAPSHOT.jar','lib/javassist.jar','lib/jhall.jar','lib/jide-action.jar','lib/jide-charts.jar','lib/jide-common.jar','lib/jide-components.jar','lib/jide-diff.jar','lib/jide-dock.jar','lib/jide-editor.jar','lib/jide-gantt.jar','lib/jide-grids.jar','lib/jide-shortcut.jar','lib/jimi.jar','lib/jna.jar','lib/jnp-client.jar','lib/jsr250-api-1.0.jar','lib/jsr305.jar','lib/jtidy.jar','lib/JUnitParams-1.0.1.jar','lib/lucene-analyzers-common-7.5.0.jar','lib/lucene-core-7.5.0.jar','lib/poi-3.14-20160307.jar','lib/poi-ooxml-3.14-20160307.jar','lib/poi-ooxml-schemas-3.14-20160307.jar','lib/webservice/axis-config.jar','lib/webservice/axis.jar','lib/webservice/commons-discovery-0.2.jar','lib/webservice/jaxrpc.jar','lib/webservice/mdserviceclient.jar','lib/webservice/rsclient.jar','lib/webservice/wsdl4j-1.5.1.jar','lib/xalan.jar','lib/xmlbeans-2.6.0.jar','lib/y.jar']
buildscript {
repositories {
jcenter()
}
dependencies {
classpath group: 'org.jfrog.buildinfo', name: 'build-info-extractor-gradle', version: '4.9.0'
classpath group: 'com.jfrog.bintray.gradle', name: 'gradle-bintray-plugin', version: '1.8.4'
classpath group: 'org.zeroturnaround', name: 'gradle-jrebel-plugin', version: '1.1.8'
}
}
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'java'
apply plugin: 'distribution'
apply plugin: 'rebel'
// In this section you declare where to find the dependencies of your project
repositories {
// mavenCentral()
if (buildAccess == 'internal') {
maven {
url 'https://cae-artifactory.jpl.nasa.gov/artifactory/maven-libs-snapshot-virtual'
credentials {
username project.getProperties().get('artifactoryUsername')
password project.getProperties().get('artifactoryPassword')
}
}
maven {
url 'https://cae-artifactory.jpl.nasa.gov/artifactory/maven-libs-release-virtual'
credentials {
username project.getProperties().get('artifactoryUsername')
password project.getProperties().get('artifactoryPassword')
}
}
}
else {
ivy {
// http://download1.nomagic.com/magicdraw185sp2/MagicDraw_185_sp2_no_install.zip
url 'http://download1.nomagic.com/'
layout 'pattern', {
artifact '/[module][revision]/[classifier].[ext]'
}
}
}
jcenter()
}
configurations {
preCompile
testPublish
}
// In this section you declare the dependencies for your production and test code
dependencies {
compile group: 'net.sf.opencsv', name: 'opencsv', version: '2.3'
// Test Dependencies
//testCompile 'junit:junit:4.11'
testCompile group: 'org.gradle', name: 'gradle-core', version: '3.5.1'
testCompile group: 'org.gradle', name: 'gradle-base-services', version: '3.5.1'
testCompile group: 'org.gradle', name: 'gradle-messaging', version: '3.5.1'
testCompile group: 'org.gradle', name: 'gradle-logging', version: '3.5.1'
testCompile group: 'org.gradle', name: 'gradle-process-services', version: '3.5.1'
testCompile group: 'org.gradle', name: 'gradle-tooling-api', version: '3.5.1'
testPublish group: 'org.openmbee.testrail', name: 'testrail-cli', version: '1.0.1'
// Other dependencies we're unable to resolve via standard repositories
if (buildAccess == 'internal') {
preCompile group: 'gov.nasa.jpl.cae.nomagic', name: 'cae-cameo-systems-modeler-core', version: '4.1.3', classifier: 'linux', ext: 'zip'
}
else {
preCompile group: 'com.nomagic', name: 'demomagicdraw', version: '190sp2', classifier: 'MagicDraw_Demo_190_sp2_no_install', ext: 'zip'
preCompile group: 'com.nomagic', name: 'sysml', version: '190sp2', classifier: 'SysML_Plugin_190_sp2_bundle', ext: 'zip'
preCompile group: 'com.nomagic', name: 'cst', version: '190sp2', classifier: 'Cameo_Simulation_Toolkit_Plugin_190_sp2', ext: 'zip'
preCompile group: 'org.openmbee.magicdraw.mdk', name: 'mdk', version: '4.1.3', classifier: 'plugin', ext: 'zip'
}
// This ensures classpath load order to match the MagicDraw provided order and then includes extras needed for non-OpenAPI stuff.
// This was necessary because of the Application class stubbing that was done in the chromium libraries.
compile files(classpathLibraries.collect { 'build/dependency-cache/extracted/' + it })
compile fileTree(dir: 'build/dependency-cache/extracted', include: ['lib/**/*.jar', 'plugins/**/*.jar'], exclude: ([ classpathLibraries, ['plugins/com.nomagic.collaborator.publisher/**/*.jar', 'plugins/com.nomagic.magicdraw.emfuml2xmi*/**/*.jar', 'plugins/com.nomagic.magicdraw.automaton/lib/engines/**/*.jar', 'plugins/tomsawyer/**/*.jar'] ]).flatten())
compile fileTree(dir: 'lib', include: ['**/*.jar'])
}
task extractDependencies {
configurations.preCompile.resolvedConfiguration.resolvedArtifacts.each { artifact ->
inputs.file artifact.file
def zipFile = new ZipFile(artifact.file)
zipFile.entries().each { entry ->
if (!entry.isDirectory()) {
outputs.file 'build/dependency-cache/extracted/' + entry.getName()
}
}
}
doLast {
inputs.files.each { archive ->
copy {
from zipTree(archive)
into 'build/dependency-cache/extracted'
}
}
fileTree(dir: 'build/dependency-cache/extracted', include: '*.zip').each { archive ->
copy {
from zipTree(archive)
into 'build/dependency-cache/extracted'
}
}
/*fileTree(dir: 'build/dependency-cache/extracted').each { file ->
outputs.file file
}*/
}
}
compileJava.dependsOn extractDependencies
javadoc {
options.addStringOption("sourcepath", "")
}
if (JavaVersion.current().isJava8Compatible()) {
tasks.withType(Javadoc) {
// disable the crazy super-strict doclint tool in Java 8
//noinspection SpellCheckingInspection
options.addStringOption('Xdoclint:none', '-quiet')
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task testsJar(type: Jar, dependsOn: testClasses) {
classifier = 'tests'
from sourceSets.test.output
exclude 'gov/nasa/jpl/mbee/mdk/test/framework/**'
exclude 'org/**'
exclude 'worker/**'
//include 'gov/nasa/jpl/mbee/mdk/test/tests/**'
}
task testsHackJar(type: Jar, dependsOn: testClasses) {
classifier = 'tests-hack'
from sourceSets.test.output
include 'gov/nasa/jpl/mbee/mdk/test/framework/**'
include 'org/**'
include 'worker/**'
//exclude 'gov/nasa/jpl/mbee/mdk/test/tests/**'
manifest {
attributes(
'Main-Class': 'gov.nasa.jpl.mbee.mdk.test.framework.GradleMagicDrawLauncher'
)
}
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
task javadocZip(type: Zip, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
class PreDist extends DefaultTask {
String humanVersion
String internalVersion
String groupName
String buildTimestamp
String descriptor
@TaskAction
void executeTask() {
project.copy {
from 'src/main/dist'
exclude 'template'
from 'src/main/dist/template'
into 'build/generated-dist'
}
project.copy {
from project.configurations.compile.resolvedConfiguration.resolvedArtifacts.file
from 'lib'
from project.jar
into "build/generated-dist/plugins/${groupName}"
}
project.copy {
from project.getTasks().getByName('javadocZip')
into "build/generated-dist/plugins/${groupName}/javadoc"
}
project.fileTree(dir: 'build/generated-dist', include: '**/*${group}*/**').each { file ->
file.renameTo(project.file(file.getAbsolutePath().replace('${group}', "${groupName}")))
}
String pluginLibraries = ''
project.fileTree(dir: "build/generated-dist/plugins/${groupName}", include: '**/*.jar').each { file ->
pluginLibraries += '\t\t<library name=\"' + file.absolutePath.replaceAll(~/.*build\/generated-dist\/plugins\/${groupName}\//, '') + '\"/>' + System.lineSeparator()
}
project.copy {
from 'src/main/dist/template/plugins/${group}/plugin.xml'
filter { String line -> line.replace('<!-- START AUTO-GENERATED -->', '<!-- START AUTO-GENERATED -->' + System.lineSeparator() + System.lineSeparator() + pluginLibraries) }
filter { String line -> line.replace('${human.version}', humanVersion) }
filter { String line -> line.replace('${internal.version}', internalVersion) }
into "build/generated-dist/plugins/${groupName}"
}
String descriptorFiles = ''
project.fileTree(dir: 'build/generated-dist').each { file ->
String relativePath = file.absolutePath.replaceAll(/.*build\/generated-dist\//, '')
descriptorFiles += '\t\t<file from=\"' + relativePath + '\" to=\"' + relativePath + '\"/>' + System.lineSeparator()
}
project.copy {
from "src/main/dist/template/data/resourcemanager/${descriptor}"
filter { String line -> line.replace('<!-- START AUTO-GENERATED -->', '<!-- START AUTO-GENERATED -->' + System.lineSeparator() + System.lineSeparator() + descriptorFiles) }
filter { String line -> line.replace('${human.version}', humanVersion) }
filter { String line -> line.replace('${internal.version}', internalVersion) }
filter { String line -> line.replace('${build.timestamp}', buildTimestamp) }
into 'build/generated-dist/data/resourcemanager'
}
}
}
task preDist(type: PreDist) {
humanVersion = version.endsWith('-SNAPSHOT') && buildTag != null && !buildTag.isEmpty() ? version.replace('-SNAPSHOT', '') : version
internalVersion = buildNumber
groupName = project.group
buildTimestamp = timestamp
descriptor = descriptorFile
}
preDist.dependsOn jar
preDist.dependsOn javadocZip
distributions {
main {
contents {
exclude 'template'
from 'build/generated-dist'
}
}
}
tasks.withType(Tar) {
enabled = false
}
distZip {
includeEmptyDirs false
duplicatesStrategy DuplicatesStrategy.EXCLUDE
eachFile { file ->
file.setPath(path.substring(path.indexOf("/") + 1, path.length()))
}
}
distZip.dependsOn preDist
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.artifactory'
apply plugin: 'com.jfrog.bintray'
publishing {
// Reference to Gradle publications defined in the build script.
// This is how we tell the Artifactory Plugin which artifacts should be
// published to Artifactory.
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar {
classifier "sources"
}
artifact testsJar {
classifier "tests"
}
artifact javadocJar {
classifier "javadoc"
}
artifact distZip {
classifier "plugin"
}
}
}
}
artifactory {
contextUrl = project.getProperties().get('artifactoryUrl')
publish {
repository {
repoKey = project.getProperties().get('artifactoryRepository')
username = project.getProperties().get('artifactoryUsername')
password = project.getProperties().get('artifactoryPassword')
maven = true
}
defaults {
publications('mavenJava')
publishArtifacts = true
// Properties to be attached to the published artifacts.
//properties = ['qa.level': 'basic', 'dev.team' : 'core']
// Publish generated POM files to Artifactory (true by default)
publishPom = true
}
}
if (buildNumber != null && !buildNumber.isEmpty()) {
clientConfig.info.setBuildNumber(buildNumber)
}
}
artifactoryPublish.dependsOn distZip
bintray {
user = project.getProperties().get('bintrayUser')
key = project.getProperties().get('bintrayKey')
publications = ['mavenJava']
publish = true
pkg {
repo = project.getProperties().get('bintrayRepo')
name = rootProject.name
userOrg = project.getProperties().get('bintrayUserOrg')
}
}
installDist {
destinationDir = file('build/plugin')
doLast {
copy {
fileMode 0755
from 'build/dependency-cache/extracted'
from 'build/plugin'
into 'build/install'
}
}
}
installDist.dependsOn distZip
task runJava(type: JavaExec) {
doFirst {
classpath files(classpathLibraries.collect { 'build/install/' + it })
}
workingDir 'build/install'
ignoreExitValue true
standardOutput = System.out
errorOutput = System.err
main = 'com.nomagic.osgi.launcher.ProductionFrameworkLauncher'
jvmArgs = ['-Xmx8192M', '-Xss512M', '-DLOCALCONFIG=true', '-DWINCONFIG=true', '-Djsse.enableSNIExtension=false', '-Djava.net.preferIPv4Stack=true', '-Dcom.sun.media.imageio.disableCodecLib=true', '-noverify', '-Dlocal.config.dir.ext=-dev', '-splash:data/splash.png', '-Dmd.class.path=$java.class.path', '-Dcom.nomagic.osgi.config.dir=configuration', '-Desi.system.config=data/application.conf', '-Dlogback.configurationFile=data/logback.xml', '-Dsun.locale.formatasdefault=true', '-Dorg.osgi.framework.bundle.parent=ext']
// arguments to pass to the application
args 'DEVELOPER'
}
runJava.dependsOn installDist
runJava.dependsOn generateRebel
task runScript(type: Exec) {
workingDir "build/install"
ignoreExitValue = true
if (System.getProperty('os.name').toLowerCase().contains('windows')) {
commandLine 'bin\\magicdraw.exe'
} else {
commandLine 'sh', 'bin/magicdraw'
}
}
runScript.dependsOn installDist
test {
ignoreFailures = true
testLogging.showStandardStreams = true
forkEvery 1
workingDir 'build/install'
/**
* The short version of the rationale is that with 18.4, MagicDraw introduced the OSGi framework as part of its
* implementation.
* Gradle and JUnit work very well together out of the box (generated reports in XML and HTML, tight IDE/Jenkins
* integration, etc.), and Gradle and OSGi was made to work with the runJava task.
* However, Gradle had to implement a number of hacks to overcome OS limitations and achieve features that can be
* applied to a broad range of software.
* Those hacks work well with most applications but not OSGi (commentary: OSGi doesn't play well with anyone), so
* we implemented a number of hacks ourselves.
* They involve classloading order, classpath redirection using the jar argument, reflection, and dynamic
* classloading.
* Ultimately, this enabled the use of the well-supported and feature-rich Gradle test task, but at the cost of
* an implementation that could break in the unlikely, albeit possible, case of either Gradle or MagicDraw
* significantly changing their implementations of the test and OSGi frameworks, respectively.
*
* Clears the default classpath since all the necessary libraries are being passed as arguments to
* GradleMagicDrawLauncher to be added to the OSGi classpath.
* Then it utilizes the -jar JVM argument to override the default Gradle command and pass the original command
* as arguments to the main class of the jar, GradleMagicDrawLauncher,
* including the classpath arguments (one of our own and one of Gradle's). It additionally parses and sets the
* system properties that are passed.
*
* Example command: .../java -Dcom.nomagic.osgi.config.dir=configuration -Desi.system.config=data/application.conf -Djava.security.manager=worker.org.gradle.process.internal.worker.child.BootstrapSecurityManager -Dlogback.configurationFile=data/logback.xml -Dmd.class.path=$java.class.path -jar /Users/igomes/mdk/build/libs/mdk-*-tests-hack.jar -cp ... -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -ea -cp .../.gradle/caches/.../workerMain/gradle-worker.jar worker.org.gradle.process.internal.worker.GradleWorkerMain 'Gradle Test Executor 1'
*
* @author igomes
*/
classpath = files()
doFirst {
def arguments = ['-jar', testsHackJar.outputs.files.singleFile, '-cp',
fileTree(dir: 'build/generated-dist', include: '**/*.jar').getFiles().stream().map { i -> i.getAbsolutePath() }.collect(Collectors.joining(File.pathSeparator)) + File.pathSeparator +
/*fileTree(dir: 'build/install', include: ['plugins/** /*.jar']).asPath + */
files(classpathLibraries.collect { 'build/install/' + it }).getFiles().stream().map { i -> i.getAbsolutePath() }.collect(Collectors.joining(File.pathSeparator)) + File.pathSeparator +
configurations.testCompile.resolvedConfiguration.resolvedArtifacts.stream().map { i -> i.getFile().getAbsolutePath() }.collect(Collectors.joining(File.pathSeparator)) + File.pathSeparator +
testsJar.outputs.files.singleFile, '-DLOCALCONFIG=true', '-DWINCONFIG=true', '-Djsse.enableSNIExtension=false', '-Djava.net.preferIPv4Stack=true', '-Dcom.sun.media.imageio.disableCodecLib=true', '-noverify', '-Dlocal.config.dir.ext=-test', '-splash:data/splash.png', '-Dmd.class.path=$java.class.path', '-Dcom.nomagic.osgi.config.dir=configuration', '-Desi.system.config=data/application.conf', '-Dlogback.configurationFile=data/logback.xml', '-Dsun.locale.formatasdefault=true', '-Dorg.osgi.framework.bundle.parent=ext']
String magicDrawLicense = project.getProperties().get('magicDrawLicense')
if (magicDrawLicense != null && !magicDrawLicense.isEmpty()) {
new File('build/install/mdlicense.tmp').write(new String(magicDrawLicense.decodeBase64()))
}
String additionalTestArguments = project.getProperties().get('additionalTestArguments')
if (additionalTestArguments != null && !additionalTestArguments.isEmpty()) {
arguments.addAll(additionalTestArguments.split(','))
}
jvmArgs = arguments
}
}
test.dependsOn testsJar
test.dependsOn testsHackJar
test.dependsOn installDist
task testrailPublish(type: JavaExec) {
classpath configurations.testPublish
main = 'org.openmbee.testrail.cli.JUnitPublisher'
def arguments = [ '--directory', 'build/test-results/test', '--milestone', version.replace('-SNAPSHOT', '') ]
def s
if ((s = project.getProperties().get('testrailHost')) != null) {
arguments.addAll('--host', s)
}
if ((s = project.getProperties().get('testrailUser')) != null || (s = project.getProperties().get('testrailUsername')) != null) {
arguments.addAll('--user', s)
}
if ((s = project.getProperties().get('testrailPassword')) != null) {
arguments.addAll('--password', s)
}
if ((s = project.getProperties().get('testrailSuiteId')) != null) {
arguments.addAll('--suite-id', s)
}
if ((s = project.getProperties().get('testrailPlanId')) != null) {
arguments.addAll('--plan-id', s)
}
if ((s = project.getProperties().get('testrailRunName')) != null) {
arguments.addAll('--run-name', s)
}
if (project.getProperties().hasProperty('testrailSkipCloseRun')) {
arguments.add('--skip-close-run')
}
args arguments
standardOutput = System.out
errorOutput = System.err
}
configure(testrailPublish) {
group = 'Publishing'
description = 'Publish test results to TestRail'
}
testrailPublish.dependsOn test