diff --git a/build.gradle b/build.gradle index 52436ce..2f8e710 100644 --- a/build.gradle +++ b/build.gradle @@ -8,8 +8,20 @@ group = 'com.github.CST-Group' description = "CST-Desktop" -sourceCompatibility = 1.8 -targetCompatibility = 1.8 +java { + //sourceCompatibility = JavaVersion.VERSION_11 + //targetCompatibility = JavaVersion.VERSION_11 + //sourceCompatibility = JavaVersion.VERSION_1_8 + //targetCompatibility = JavaVersion.VERSION_1_8 + + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} + version = '1.1.0' repositories { @@ -18,12 +30,15 @@ repositories { } mavenCentral() maven { - url "https://github.com/rosjava/rosjava_mvn_repo/raw/master" + url = "https://github.com/rosjava/rosjava_mvn_repo/raw/master" } maven { - url "https://artifacts.camunda.com/artifactory/public/" + url = "https://artifacts.camunda.com/artifactory/public/" + } + maven { url = 'https://jitpack.io' } + maven { + url = 'https://cst-group.github.io/cst-dependencies/maven-repo/' } - maven { url 'https://jitpack.io' } } configurations { @@ -31,27 +46,20 @@ configurations { } dependencies { - //api('com.github.CST-Group:cst:e93dc57') - api('com.github.CST-Group:cst-bindings:1.1.0') - //api ':cst-bindings:1.0.6-full' + api('com.github.CST-Group:cst-bindings:f5eb368') api group: 'org.jfree', name: 'jfreechart', version: '1.0.19' api 'com.soartech:jsoar-core:4.1.3' api 'com.soartech:jsoar-debugger:4.1.3' - //api 'org.ros.rosjava_core:rosjava:0.3.6' - //implementation 'com.github.rosjava:rosjava_core:0.3.7' api group: 'net.sf.jung', name: 'jung-algorithms', version: '2.0.1' api group: 'net.sf.jung', name: 'jung-graph-impl', version: '2.0.1' api group: 'net.sf.jung', name: 'jung-visualization', version: '2.0.1' api group: 'net.sf.jung', name: 'jung-api', version: '2.0.1' - api 'com.github.rosjava:rosjava_core:0.3.7' - api 'org.ros.rosjava_bootstrap:message_generation:0.3.3' testImplementation 'com.github.CST-Group:cst:e93dc57' testImplementation 'com.1stleg:jnativehook:2.1.0' - testImplementation group: 'junit', name: 'junit', version: '4.12' - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2' - testImplementation 'org.ros.rosjava_messages:std_msgs:0.5.11' - testImplementation 'org.ros.rosjava_messages:rosjava_test_msgs:0.3.0' + // These are necessary for JUnit5 tests + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.11.0' + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.11.0' + testRuntimeOnly 'org.junit.platform:junit-platform-launcher' } task javadocJar(type: Jar) { @@ -97,3 +105,11 @@ jacocoTestReport { xml.required = true } } + +uberJar { + dependsOn jar +} + +test { + useJUnitPlatform() +} \ No newline at end of file diff --git a/src/main/java/br/unicamp/cst/util/viewer/MindViewer.java b/src/main/java/br/unicamp/cst/util/viewer/MindViewer.java index ead7754..021a3d4 100644 --- a/src/main/java/br/unicamp/cst/util/viewer/MindViewer.java +++ b/src/main/java/br/unicamp/cst/util/viewer/MindViewer.java @@ -119,7 +119,6 @@ public MindViewer(Mind mind, String windowName, List behavioralCodelets Logger.getLogger("javax.swing").setLevel(Level.OFF); } - private void buildMindModulePanels(Mind mind){ if(mind.getCodeletGroupsNumber() > 0) { if (mind.getCodeletGroupList("Motivational") != null) { @@ -127,13 +126,20 @@ private void buildMindModulePanels(Mind mind){ motivationalModuleViewer = new MotivationalSubsystemViewer(Long.parseLong(txtRefreshTime.getText()), mind); tbModules.add("Motivational Subsystem", motivationalModuleViewer); } - } + } + if (mind.getCodeletGroupList("Planning") != null) { + if (mind.getCodeletGroupList("Planning").size() > 0) { + JSoarCodelet jSoarCodelet = (JSoarCodelet) mind.getCodeletGroupList("Planning").get(0); + plansSubsystemModule.setjSoarCodelet(jSoarCodelet); + if(plansSubsystemModule.verifyExistCodelets()){ + plansSubsystemViewer = new PlansSubsystemViewer(Long.parseLong(txtRefreshTime.getText()), this); + tbControl.add("Plans Subsystem", plansSubsystemViewer); + } + } + } } - if(plansSubsystemModule.verifyExistCodelets()){ - plansSubsystemViewer = new PlansSubsystemViewer(Long.parseLong(txtRefreshTime.getText()), this); - tbControl.add("Plans Subsystem", plansSubsystemViewer); - } + } /**