diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 0cfeb18c9..82f27a315 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -16,10 +16,10 @@ dependencies { javafx { modules = listOf("javafx.base", "javafx.fxml", "javafx.web", "javafx.swing") - version = "20.0.+" + version = "21.0.+" } -version = "0.22.0" +version = "0.23.0-SNAPSHOT" val mainClassName = "org.jskat.JSkatKt" diff --git a/build-logic/src/main/kotlin/jskat.java-common-conventions.gradle.kts b/build-logic/src/main/kotlin/jskat.java-common-conventions.gradle.kts index 707bb3f8a..d0e51e58f 100644 --- a/build-logic/src/main/kotlin/jskat.java-common-conventions.gradle.kts +++ b/build-logic/src/main/kotlin/jskat.java-common-conventions.gradle.kts @@ -9,20 +9,20 @@ repositories { } dependencies { - implementation("org.slf4j:slf4j-api:2.0.7") - implementation("ch.qos.logback:logback-classic:1.4.6") - implementation("com.google.guava:guava:31.1-jre") + implementation("org.slf4j:slf4j-api:2.0.9") + implementation("ch.qos.logback:logback-classic:1.4.11") + implementation("com.google.guava:guava:32.1.3-jre") - testImplementation("org.junit.jupiter:junit-jupiter-api:5.9.2") - testImplementation("org.junit.jupiter:junit-jupiter-params:5.9.2") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.9.2") - testImplementation("org.mockito:mockito-core:5.2.0") + testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.0") + testImplementation("org.junit.jupiter:junit-jupiter-params:5.10.0") + testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.0") + testImplementation("org.mockito:mockito-core:5.6.0") testImplementation("org.assertj:assertj-core:3.24.2") } java { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 + sourceCompatibility = JavaVersion.VERSION_20 + targetCompatibility = JavaVersion.VERSION_20 withSourcesJar() withJavadocJar() diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index bdc9a83b1..744c64d12 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/jskat-javafx-gui/build.gradle.kts b/jskat-javafx-gui/build.gradle.kts index b5a823267..3f5e58ebd 100644 --- a/jskat-javafx-gui/build.gradle.kts +++ b/jskat-javafx-gui/build.gradle.kts @@ -11,5 +11,5 @@ dependencies { javafx { modules = listOf("javafx.base", "javafx.fxml", "javafx.web", "javafx.swing") - version = "20.0.+" + version = "21.0.+" } diff --git a/jskat-javafx-gui/src/main/java/org/jskat/JSkatFX.java b/jskat-javafx-gui/src/main/java/org/jskat/JSkatFX.java index 4f1d2e2c0..325bded43 100644 --- a/jskat-javafx-gui/src/main/java/org/jskat/JSkatFX.java +++ b/jskat-javafx-gui/src/main/java/org/jskat/JSkatFX.java @@ -33,6 +33,8 @@ import org.jskat.gui.swing.LookAndFeelSetter; import org.jskat.util.JSkatResourceBundle; import org.jskat.util.version.VersionChecker; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import javax.swing.*; import java.awt.*; @@ -40,7 +42,8 @@ public class JSkatFX extends Application { - private static final String VERSION = "0.22.0"; + private static final Logger LOG = LoggerFactory.getLogger(JSkatFX.class); + private static final String VERSION = "0.23.0"; private static final int SPLASH_WIDTH = 500; private static final int SPLASH_HEIGHT = 300; @@ -126,27 +129,25 @@ private static void showNewMainWindow(final Screen targetScreen, final Point2D s final VBox rootLayout = loader.load(); final Dimension2D dimension = getMainWindowDimension(targetScreen); + LOG.info("Main window size {}x{}", dimension.getWidth(), dimension.getHeight()); final Scene scene = new Scene(rootLayout, dimension.getWidth(), dimension.getHeight()); // TODO: set this globally scene.getStylesheets().add("/org/jskat/gui/javafx/jskat.css"); - scene.widthProperty().addListener( - (observable, oldValue, newValue) -> JSkatOptions.instance().setMainFrameWidth(newValue.intValue())); - scene.heightProperty().addListener( - (observable, oldValue, newValue) -> JSkatOptions.instance().setMainFrameHeight(newValue.intValue())); + scene.widthProperty().addListener((observable, oldValue, newValue) -> JSkatOptions.instance().setMainFrameWidth(newValue.intValue())); + scene.heightProperty().addListener((observable, oldValue, newValue) -> JSkatOptions.instance().setMainFrameHeight(newValue.intValue())); final Stage stage = new Stage(); stage.setTitle("JSkat " + version); - stage.setScene(scene); stage.setOnCloseRequest(event -> JSkatMaster.INSTANCE.exitJSkat()); - stage.xProperty().addListener((observable, oldValue, newValue) -> - JSkatOptions.instance().setMainFrameXPosition(newValue.intValue())); - stage.yProperty().addListener((observable, oldValue, newValue) -> - JSkatOptions.instance().setMainFrameYPosition(newValue.intValue())); + stage.setScene(scene); - stage.setOnCloseRequest(event -> JSkatMaster.INSTANCE.exitJSkat()); + stage.setWidth(dimension.getWidth()); + stage.setHeight(dimension.getHeight()); + stage.xProperty().addListener((observable, oldValue, newValue) -> JSkatOptions.instance().setMainFrameXPosition(newValue.intValue())); + stage.yProperty().addListener((observable, oldValue, newValue) -> JSkatOptions.instance().setMainFrameYPosition(newValue.intValue())); placeMainWindow(targetScreen, stage, screenPosition); @@ -158,11 +159,11 @@ private void showSplashScreen(final Screen targetScreen, final Stage splashStage final ImageView splashScreenImage = new ImageView( new Image(ClassLoader.getSystemResourceAsStream("org/jskat/gui/img/gui/splash.png"))); - ProgressBar splashScreenProgressBar = new ProgressBar(); + final ProgressBar splashScreenProgressBar = new ProgressBar(); splashScreenProgressBar.setPrefWidth(SPLASH_WIDTH); - Label splashScreenProgressText = new Label("Loading JSkat..."); + final Label splashScreenProgressText = new Label("Loading JSkat..."); splashScreenProgressText.setAlignment(Pos.CENTER); - VBox splashScreenLayout = new VBox(); + final VBox splashScreenLayout = new VBox(); splashScreenLayout.getChildren().addAll(splashScreenImage, splashScreenProgressBar, splashScreenProgressText); splashScreenLayout.setStyle("-fx-padding: 5; -fx-spacing: 5; -fx-border-width:2;"); splashScreenLayout.setEffect(new DropShadow()); diff --git a/jskat-swing-gui/build.gradle.kts b/jskat-swing-gui/build.gradle.kts index ff8aa5465..29db9171d 100644 --- a/jskat-swing-gui/build.gradle.kts +++ b/jskat-swing-gui/build.gradle.kts @@ -12,5 +12,5 @@ dependencies { javafx { modules = listOf("javafx.controls") - version = "20.0.+" + version = "21.0.+" }