From 36c98d742b2474c3b0ca8b50d8cd23835b979d69 Mon Sep 17 00:00:00 2001 From: Alexander Weigl Date: Mon, 27 May 2024 01:08:35 +0200 Subject: [PATCH] updated versions and fixing gradle assemble errors --- build.gradle | 4 +-- exec/build.gradle | 16 ++++++++++-- fxutils/build.gradle.kts | 10 ++++++-- .../edu/kit/iti/formal/automation/fx/fx.kt | 14 +++++++---- stvs/build.gradle | 4 +-- .../kit/iti/formal/stvs/StvsApplication.kt | 25 ++++++++++--------- .../smtlib/SmtConvertExpressionVisitor.kt | 2 +- 7 files changed, 49 insertions(+), 26 deletions(-) diff --git a/build.gradle b/build.gradle index d80eed5a..41467dc1 100644 --- a/build.gradle +++ b/build.gradle @@ -49,7 +49,7 @@ subprojects { apply plugin: 'maven-publish' apply plugin: 'jacoco' - ext.kotlin_version = '2.0.0-RC3' + ext.kotlin_version = '2.0.0' sourceCompatibility = 21 targetCompatibility = 21 @@ -111,7 +111,7 @@ subprojects { implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - implementation group: 'org.jetbrains', name: 'annotations', version: '24.1.0' + implementation group: "org.jetbrains", name: 'annotations', version: '24.1.0' implementation group: 'org.slf4j', name: 'slf4j-api', version: '2.0.13' implementation group: 'org.slf4j', name: 'slf4j-simple', version: '2.0.13' testImplementation 'com.google.truth:truth:1.4.2' diff --git a/exec/build.gradle b/exec/build.gradle index 672931a3..b93e38dd 100644 --- a/exec/build.gradle +++ b/exec/build.gradle @@ -46,8 +46,8 @@ def mainClasses = [ , 'verifaps-versions': "edu.kit.iti.formal.util.Version" , "st2cpp" : "edu.kit.iti.formal.automation.ST2CppApp" - , "ide" : "edu.kit.iti.formal.automation.ide.Ide" - , "stvs" : "edu.kit.iti.formal.automation.ide.STVS" + , "ide" : "edu.kit.iti.formal.automation.fx.Main" + , "stvs" : "edu.kit.iti.formal.stvs.Main" // , "smteta" : "edu.kit.iti.formal.automation.testtables.apps.SMTeta" , "xml2st" : "edu.kit.iti.formal.automation.Xml2TxtApp" ] @@ -76,3 +76,15 @@ applicationDistribution.into("bin") { from(createScriptSc11_rev)*/ fileMode = 0755 } + +tasks.withType(Tar).configureEach { + duplicatesStrategy = DuplicatesStrategy.EXCLUDE +} + +tasks.withType(Zip).configureEach { + duplicatesStrategy = DuplicatesStrategy.EXCLUDE +} + +installDist { + duplicatesStrategy = DuplicatesStrategy.EXCLUDE +} \ No newline at end of file diff --git a/fxutils/build.gradle.kts b/fxutils/build.gradle.kts index ac64c25b..bda8c2fc 100644 --- a/fxutils/build.gradle.kts +++ b/fxutils/build.gradle.kts @@ -3,11 +3,17 @@ plugins { } javafx { - version = "21" + version = "22" modules = listOf("javafx.controls") } dependencies { + for (module in listOf("javafx-controls", "javafx-fxml", "javafx-graphics", "javafx-web")) { + for (classifier in listOf("win", "linux", "mac")) { + api("org.openjfx:$module:22:$classifier") + } + } + api("com.pixelduke:fxribbon:1.2.2") api("no.tornado:tornadofx:1.7.20") api("com.miglayout:miglayout-javafx:11.3") @@ -17,5 +23,5 @@ dependencies { api("org.kordamp.ikonli:ikonli-javafx:12.3.1") api("com.pixelduke:fxribbon:1.2.2") api("org.jfxtras:jmetro:11.6.15") - api("org.controlsfx:controlsfx:8.40.13") + api("org.controlsfx:controlsfx:11.0.0") } \ No newline at end of file diff --git a/ide/src/main/kotlin/edu/kit/iti/formal/automation/fx/fx.kt b/ide/src/main/kotlin/edu/kit/iti/formal/automation/fx/fx.kt index 7076dca2..ea718690 100644 --- a/ide/src/main/kotlin/edu/kit/iti/formal/automation/fx/fx.kt +++ b/ide/src/main/kotlin/edu/kit/iti/formal/automation/fx/fx.kt @@ -1,6 +1,9 @@ package edu.kit.iti.formal.automation.fx -import edu.kit.iti.formal.fxutils.* +import edu.kit.iti.formal.fxutils.group +import edu.kit.iti.formal.fxutils.item +import edu.kit.iti.formal.fxutils.ribbon +import edu.kit.iti.formal.fxutils.tab import edu.kit.iti.formal.util.info import javafx.application.Platform import javafx.beans.property.SimpleObjectProperty @@ -18,11 +21,12 @@ import tornadofx.* import java.io.File import java.nio.file.Files import java.nio.file.Paths -import edu.kit.iti.formal.fxutils.item - -fun main(args: Array) { - launch(*args) +object Main { + @JvmStatic + fun main(args: Array) { + launch(*args) + } } class IdeStyle : Stylesheet() { diff --git a/stvs/build.gradle b/stvs/build.gradle index e690917d..006e0641 100644 --- a/stvs/build.gradle +++ b/stvs/build.gradle @@ -13,10 +13,10 @@ javadoc { options.charSet = 'UTF-8' } -javafx { +/*javafx { version = "21" modules = ["javafx.controls", "javafx.controls", "javafx.fxml", "javafx.graphics", "javafx.web"] -} +}*/ dependencies { implementation project(':lang') diff --git a/stvs/src/main/kotlin/edu/kit/iti/formal/stvs/StvsApplication.kt b/stvs/src/main/kotlin/edu/kit/iti/formal/stvs/StvsApplication.kt index 40b6d9aa..274babb8 100644 --- a/stvs/src/main/kotlin/edu/kit/iti/formal/stvs/StvsApplication.kt +++ b/stvs/src/main/kotlin/edu/kit/iti/formal/stvs/StvsApplication.kt @@ -5,6 +5,7 @@ import edu.kit.iti.formal.stvs.view.StvsMainScene import edu.kit.iti.formal.stvs.view.common.HostServiceSingleton import edu.kit.iti.formal.stvs.view.menu.WelcomeWizard import javafx.application.Application +import javafx.application.Application.launch import javafx.application.Platform import javafx.scene.Node import javafx.scene.control.TitledPane @@ -85,18 +86,18 @@ class StvsApplication : Application() { primaryStage!!.hide() exitProcess(0) } +} - companion object { - /** - * Launch the application. - * - * @param args The command-line arguments passed to the application - */ - @JvmStatic - fun main(args: Array) { - Locale.setDefault(Locale.ENGLISH) - //System.setProperty("javafx.preloader", StvsPreloader::class.java.getCanonicalName()) - launch(StvsApplication::class.java, *args) - } +object Main { + /** + * Launch the application. + * + * @param args The command-line arguments passed to the application + */ + @JvmStatic + fun main(args: Array) { + Locale.setDefault(Locale.ENGLISH) + //System.setProperty("javafx.preloader", StvsPreloader::class.java.getCanonicalName()) + launch(StvsApplication::class.java, *args) } } diff --git a/stvs/src/main/kotlin/edu/kit/iti/formal/stvs/logic/specification/smtlib/SmtConvertExpressionVisitor.kt b/stvs/src/main/kotlin/edu/kit/iti/formal/stvs/logic/specification/smtlib/SmtConvertExpressionVisitor.kt index 3f10cb60..bf64fd3c 100644 --- a/stvs/src/main/kotlin/edu/kit/iti/formal/stvs/logic/specification/smtlib/SmtConvertExpressionVisitor.kt +++ b/stvs/src/main/kotlin/edu/kit/iti/formal/stvs/logic/specification/smtlib/SmtConvertExpressionVisitor.kt @@ -108,7 +108,7 @@ class SmtConvertExpressionVisitor( */ override fun visitVariable(expr: VariableExpr): SExpression { val variableName = expr.variableName - val variableReferenceIndex = expr.getIndex()!!.orElse(0) + val variableReferenceIndex = expr.index ?: 0 // Check if variable is in getTypeForVariable checkNotNull(smtEncoder.getTypeForVariable(variableName)) { "Wrong Context: No variable of name '$variableName' in getTypeForVariable" }