Skip to content

Commit

Permalink
Prepare for version 0.23.0, update Gradle and all dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
b0n541 committed Oct 31, 2023
1 parent 5176312 commit 50d2539
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 28 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion jskat-javafx-gui/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ dependencies {

javafx {
modules = listOf("javafx.base", "javafx.fxml", "javafx.web", "javafx.swing")
version = "20.0.+"
version = "21.0.+"
}
29 changes: 15 additions & 14 deletions jskat-javafx-gui/src/main/java/org/jskat/JSkatFX.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,17 @@
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.*;
import java.io.IOException;

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;
Expand Down Expand Up @@ -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);

Expand All @@ -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());
Expand Down
2 changes: 1 addition & 1 deletion jskat-swing-gui/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ dependencies {

javafx {
modules = listOf("javafx.controls")
version = "20.0.+"
version = "21.0.+"
}

0 comments on commit 50d2539

Please sign in to comment.