@@ -13,14 +13,17 @@ buildscript {
1313 }
1414 dependencies {
1515 classpath " io.github.gradle-nexus:publish-plugin:1.0.0"
16+ classpath group : ' org.openjfx' , name : ' javafx-plugin' , version : ' 0.0.14'
1617 }
1718}
1819
20+
1921plugins {
2022 id ' idea'
2123 id ' eclipse'
2224 id ' java'
2325 id ' distribution'
26+ id ' org.openjfx.javafxplugin' version ' 0.0.14'
2427}
2528
2629String buildProfile = project. getProperties(). getOrDefault(' buildProfile' , ' opensource' )
@@ -63,14 +66,10 @@ else {
6366String docbookNameVersion = ' docbook-xsl-1.79.1'
6467String fopNameVersion = ' fop-1.1'
6568
66- java {
67- sourceCompatibility = ' VERSION_1_8'
68- targetCompatibility = ' VERSION_1_8'
69- }
70-
71-
7269// In this section you declare where to find the dependencies of your project
7370repositories {
71+ mavenCentral()
72+ flatDir { dirs " libz" } // Put Cameo no-install and plugin zips here
7473 ivy {
7574 url " https://sourceforge.net/projects/docbook/files/docbook-xsl/"
7675 patternLayout {
@@ -91,7 +90,6 @@ repositories {
9190
9291 // url 'https://mirror.nodesdirect.com/apache/xmlgraphics/fop/binaries/' for newer version
9392 }
94- mavenCentral()
9593 maven {
9694 url ' https://repo.gradle.org/gradle/libs-releases-local/'
9795 }
@@ -135,6 +133,7 @@ if (profiles['repositories'] != null) {
135133
136134configurations {
137135 preImplementation
136+ distribution
138137 testPublish
139138}
140139
@@ -152,7 +151,7 @@ dependencies {
152151 implementation group : ' org.jsoup' , name : ' jsoup' , version : ' 1.6.1'
153152 // implementation group: 'org.jsoup', name: 'jsoup', version: '1.9.1+'
154153
155- // JGraphT
154+ // JGraphT
156155 implementation group : ' net.sf.jgrapht' , name : ' jgrapht' , version : ' 0.8.3'
157156 // implementation group: 'org.jgrapht', name: 'jgrapht', version: '1.0.0+'
158157
@@ -168,8 +167,8 @@ dependencies {
168167 implementation group : ' net.sf.opencsv' , name : ' opencsv' , version : ' 2.3'
169168 // implementation group: 'com.opencsv', name: 'opencsv', version: '3.8+'
170169
171- // ActiveMQ
172- implementation group : ' org.apache.activemq' , name : ' activemq-all' , version : ' 5.9.1'
170+ // ActiveMQ
171+ // implementation group: 'org.apache.activemq', name: 'activemq-all', version: '5.9.1'
173172 // implementation group: 'org.apache.activemq', name: 'activemq-all', version: '5.14.0+'
174173
175174 // Jackson
@@ -187,10 +186,10 @@ dependencies {
187186 implementation group : ' org.apache.httpcomponents' , name : ' httpmime' , version : ' 4.5.2'
188187
189188 // Apache Commons CLI
190- implementation group : ' commons-cli' , name : ' commons-cli' , version : ' 1.2 '
189+ implementation group : ' commons-cli' , name : ' commons-cli' , version : ' 1.4 '
191190
192191 // OpenMBEE MMS Java Client
193- implementation group : ' org.openmbee.mms' , name : ' mms-java-client' , version : ' 3.4.2'
192+ // implementation group: 'org.openmbee.mms', name: 'mms-java-client', version: '3.4.2'
194193
195194 implementation group : ' com.beust' , name : ' jcommander' , version : ' 1.72'
196195
@@ -216,14 +215,19 @@ dependencies {
216215 }
217216 }
218217 else {
219- preImplementation group : ' com.nomagic' , name : ' demomagicdraw ' , version : ' 190sp3 ' , classifier : ' MagicDraw_Demo_190_sp3_no_install ' , ext : ' zip'
220- preImplementation group : ' com.nomagic' , name : ' sysml' , version : ' 190sp3 ' , classifier : ' SysML_Plugin_190_sp3_bundle ' , ext : ' zip'
221- preImplementation group : ' com.nomagic' , name : ' cst' , version : ' 190sp3 ' , classifier : ' Cameo_Simulation_Toolkit_Plugin_190_sp3 ' , ext : ' zip'
218+ preImplementation group : ' com.nomagic' , name : ' democsm ' , version : ' 2022xRefresh1 ' , classifier : ' Cameo_Systems_Modeler_2022x_Refresh1_HF1_no_install ' , ext : ' zip'
219+ // preCompile group: 'com.nomagic', name: 'sysml', version: '2021x ', classifier: 'SysML_Plugin_2021x ', ext: 'zip'
220+ // preCompile group: 'com.nomagic', name: 'cst', version: '2021x ', classifier: 'Cameo_Simulation_Toolkit_Plugin_2021x ', ext: 'zip'
222221 }
223222
224223 preImplementation group : ' org.apache.fop' , name : ' fop' , version : ' 1.1' , classifier : fopNameVersion + ' -bin' , ext : ' zip'
225224 preImplementation group : ' net.sourceforge.docbook' , name : ' docbook-xsl' , version : ' 1.79.1' , classifier : docbookNameVersion, ext : ' zip'
226225
226+ // JavaFX
227+ // preImplementation group: 'org.openjfx', name: 'javafx-fxml', version: '11.0.2'
228+ // preImplementation group: 'org.openjfx', name: 'javafx-controls', version: '11.0.2'
229+ // preImplementation group: 'org.openjfx', name: 'javafx-swing', version: '11.0.2'
230+
227231 // This ensures classpath load order to match the MagicDraw provided order and then includes extras needed for non-OpenAPI stuff.
228232 // This was necessary because of the Application class stubbing that was done in the chromium libraries.
229233 implementation files(classpathLibraries. collect { ' build/dependency-cache/extracted/magicdraw/' + it })
@@ -236,9 +240,19 @@ dependencies {
236240 implementation files(it)
237241 }
238242 }
243+ else {
244+ implementation files(' build/dependency-cache/extracted/fop/jars/fop-1.1.jar' , ' build/dependency-cache/extracted/fop/jars/xmlgraphics-commons-1.5.jar' )
245+ }
239246
240247}
241248
249+ javafx {
250+ version = " 11.0.2"
251+ modules = [ ' javafx.controls' , ' javafx.fxml' , ' javafx.swing' ]
252+ platform = ' win'
253+ configurations = [' preImplementation' ]
254+ }
255+
242256task extractDependencies {
243257 configurations. preImplementation. resolvedConfiguration. resolvedArtifacts. each { artifact ->
244258 inputs. file artifact. file
@@ -278,6 +292,12 @@ task extractDependencies {
278292 into ' build/dependency-cache/extracted/docbook'
279293 }
280294 }
295+ else if (archive. getName(). startsWith(' javafx' )) {
296+ copy {
297+ from archive. getAbsoluteFile()
298+ into ' build/dependency-cache/extracted/javafx'
299+ }
300+ }
281301 else {
282302 copy {
283303 from zipTree(archive)
@@ -316,7 +336,7 @@ task testsJar(type: Jar, dependsOn: testClasses) {
316336 archiveClassifier = ' tests'
317337 from sourceSets. test. output
318338
319- exclude ' gov/nasa/jpl/mbee /mdk/test/framework/**'
339+ exclude ' org/openmbee /mdk/test/framework/**'
320340 exclude ' org/**'
321341 exclude ' worker/**'
322342 // include 'gov/nasa/jpl/mbee/mdk/test/tests/**'
@@ -326,14 +346,14 @@ task testsHackJar(type: Jar, dependsOn: testClasses) {
326346 archiveClassifier = ' tests-hack'
327347 from sourceSets. test. output
328348
329- include ' gov/nasa/jpl/mbee /mdk/test/framework/**'
349+ include ' org/openmbee /mdk/test/framework/**'
330350 include ' org/**'
331351 include ' worker/**'
332352 // exclude 'gov/nasa/jpl/mbee/mdk/test/tests/**'
333353
334354 manifest {
335355 attributes(
336- ' Main-Class' : ' gov.nasa.jpl.mbee .mdk.test.framework.GradleMagicDrawLauncher'
356+ ' Main-Class' : ' org.openmbee .mdk.test.framework.GradleMagicDrawLauncher'
337357 )
338358 }
339359}
@@ -382,6 +402,10 @@ abstract class PreDist extends DefaultTask {
382402 from project. jar
383403 into " ${ outputDir} /plugins/${ groupName} "
384404 }
405+ project. copy {
406+ from " ${ extractedCache} /javafx"
407+ into " ${ outputDir} /plugins/${ groupName} /javafx"
408+ }
385409 project. copy {
386410 from project. getTasks(). getByName(' javadocZip' )
387411 into " ${ outputDir} /plugins/${ groupName} /javadoc"
@@ -491,7 +515,6 @@ distZip {
491515 eachFile { file ->
492516 file. setPath(path. substring(path. indexOf(" /" ) + 1 , path. length()))
493517 }
494-
495518}
496519
497520distZip. dependsOn preDist
@@ -593,8 +616,8 @@ task runJava(type: JavaExec) {
593616 if (profiles[" executablePath" ] != null ) {
594617 executable = profiles[" executablePath" ]
595618 }
596- main = ' com.nomagic.osgi.launcher.ProductionFrameworkLauncher '
597- jvmArgs = [' -Xmx8192M' , ' -Xss512M' , ' -DLOCALCONFIG=true' , ' -DWINCONFIG=true' , ' -Djsse.enableSNIExtension=true' , ' -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 ' ]
619+ main = ' com.nomagic.magicdraw.Main '
620+ jvmArgs = [' --module-path ' , ' plugins/org.openmbee.mdk/javafx ' , ' --add-modules ' , ' javafx.controls,javafx.swing,javafx.fxml ' , ' - Xmx8192M' , ' -Xss512M' , ' -DLOCALCONFIG=true' , ' -DWINCONFIG=true' , ' -Djsse.enableSNIExtension=true' , ' -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' , ' -Desi.system.config=data/application.conf' , ' -Dlogback.configurationFile=data/logback.xml' , ' -Dsun.locale.formatasdefault=true' , ' -Djdk.attach.allowAttachSelf=true ' ]
598621 // arguments to pass to the application
599622 args ' DEVELOPER'
600623}
@@ -611,8 +634,8 @@ task testAVG(type: JavaExec) {
611634 standardOutput = System . out
612635 errorOutput = System . err
613636
614- main = ' com.nomagic.osgi.launcher.ProductionFrameworkLauncher '
615- jvmArgs = [' -Xmx8192M' , ' -Xss512M' , ' -DLOCALCONFIG=true' , ' -DWINCONFIG=true' , ' -Djsse.enableSNIExtension=true' , ' -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 ' , ' - Dcom.nomagic.magicdraw.launcher=com.nomagic.magicdraw.commandline.CommandLineActionLauncher' , ' -Dcom.nomagic.magicdraw.commandline.action=gov.nasa.jpl.mbee .pma.cli.AutomatedViewGenerator' ]
637+ main = ' com.nomagic.magicdraw.Main '
638+ jvmArgs = [' -Xmx8192M' , ' -Xss512M' , ' -DLOCALCONFIG=true' , ' -DWINCONFIG=true' , ' -Djsse.enableSNIExtension=true' , ' -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' , ' -Desi.system.config=data/application.conf' , ' -Dlogback.configurationFile=data/logback.xml' , ' -Dsun.locale.formatasdefault=true' , ' -Dcom.nomagic.magicdraw.launcher=com.nomagic.magicdraw.commandline.CommandLineActionLauncher' , ' -Dcom.nomagic.magicdraw.commandline.action=org.openmbee .pma.cli.AutomatedViewGenerator' ]
616639}
617640
618641testAVG. dependsOn installDist
@@ -665,6 +688,7 @@ test {
665688 * 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'
666689 *
667690 * @author igomes
691+ * TODO 2021x refresh 1 removed osgi
668692 */
669693 classpath = files()
670694 doFirst {
0 commit comments