Skip to content

Commit

Permalink
fix: update build after dependencies update
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph5610 committed Mar 31, 2024
1 parent 1f0f32d commit 46488ed
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 11 deletions.
5 changes: 3 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ val tornadoFxVersion = "2.0.0-SNAPSHOT"
val log4jVersion = "2.23.1"
val slf4jVersion = "2.0.12"
val kotlinLoggingVersion = "3.0.5"
val testFxVersion = "4.0.16-alpha"
val testFxVersion = "4.0.18"
val junitVersion = "5.10.2"
val vlcjVersion = "4.8.2"
val humbleVersion = "0.3.0"
Expand Down Expand Up @@ -127,6 +127,7 @@ dependencies {
testImplementation("org.junit.jupiter:junit-jupiter-api:$junitVersion")
testImplementation("org.testfx:testfx-core:$testFxVersion")
testImplementation("org.testfx:testfx-junit5:$testFxVersion")
testImplementation("org.hamcrest:hamcrest:2.1")
}

configurations {
Expand All @@ -141,7 +142,7 @@ configurations {

javafx {
version = "21.0.2"
modules = mutableListOf("javafx.controls", "javafx.media")
modules = mutableListOf("javafx.base", "javafx.graphics", "javafx.controls", "javafx.media")
}

application {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
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.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
3 changes: 2 additions & 1 deletion src/main/kotlin/online/hudacek/fxradio/FxRadio.kt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ private const val WINDOW_MIN_WIDTH = 800.0
private const val WINDOW_MIN_HEIGHT = 600.0
private const val WINDOW_DEFAULT_WIDTH = 950.0
private const val WINDOW_DEFAULT_HEIGHT = 680.0

/**
* Load app in Dark Mode
*/
Expand Down Expand Up @@ -122,7 +123,7 @@ open class FxRadio(

trayIcon.subscribe()
MacUtils.setAppearance(preferencesViewModel.darkModeProperty.value)
if(MacUtils.isMac) {
if (MacUtils.isMac) {
NsMenu.createDockMenu()
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
package online.hudacek.fxradio.test.integration

import javafx.application.Platform
import javafx.stage.Stage
import online.hudacek.fxradio.FxRadio
import online.hudacek.fxradio.ui.style.Styles
import online.hudacek.fxradio.viewmodel.Log
import online.hudacek.fxradio.viewmodel.LogViewModel
import online.hudacek.fxradio.viewmodel.Preferences
import online.hudacek.fxradio.viewmodel.PreferencesViewModel
import org.apache.logging.log4j.Level
import org.junit.jupiter.api.extension.ExtendWith
import org.testfx.api.FxRobot
import org.testfx.framework.junit5.ApplicationExtension
import org.testfx.framework.junit5.Start
import org.testfx.framework.junit5.Stop
import tornadofx.find

/**
Expand All @@ -23,18 +27,19 @@ abstract class BaseTest {

protected val robot: FxRobot = FxRobot()

@Start
protected fun loadApp(stage: Stage) {
app = FxRadio(stylesheet = Styles::class, isAppRunningInTest = true)
app.start(stage)

// Disable app logger to have only relevant logs
val logViewModel = find<LogViewModel>()
logViewModel.item = Log(Level.INFO)
logViewModel.commit()

val preferencesViewModel = find<PreferencesViewModel>()
preferencesViewModel.useTrayIconProperty.value = false
Platform.runLater {
// Disable app logger to have only relevant logs
val logViewModel = find<LogViewModel>()
logViewModel.item = Log(Level.INFO)
logViewModel.commit()
}
}

@Stop
protected fun stopApp() = app.stop()
}

0 comments on commit 46488ed

Please sign in to comment.