From c760e1560899ff10609378c9671219ae3e169437 Mon Sep 17 00:00:00 2001 From: aro Date: Sun, 15 Jan 2023 12:40:30 +0100 Subject: [PATCH] feat: include modules and put layout file in working folder --- build.gradle.kts | 1 + src/main/kotlin/xyz/atnrch/wrench/WrenchApp.kt | 2 ++ src/main/kotlin/xyz/atnrch/wrench/storage/LayoutStorage.kt | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index a1385d4..ff32eef 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -33,6 +33,7 @@ compose.desktop { application { mainClass = "xyz.atnrch.wrench.WrenchApp" nativeDistributions { + includeAllModules = true targetFormats(TargetFormat.AppImage) packageName = "Wrench" packageVersion = "1.0.0" diff --git a/src/main/kotlin/xyz/atnrch/wrench/WrenchApp.kt b/src/main/kotlin/xyz/atnrch/wrench/WrenchApp.kt index 85a6c3e..7737e1e 100644 --- a/src/main/kotlin/xyz/atnrch/wrench/WrenchApp.kt +++ b/src/main/kotlin/xyz/atnrch/wrench/WrenchApp.kt @@ -7,6 +7,7 @@ import androidx.compose.ui.window.application import androidx.compose.ui.window.rememberWindowState import xyz.atnrch.wrench.gui.WrenchScaffold import xyz.atnrch.wrench.logger.Logger +import java.nio.file.Paths import javax.swing.UIManager class WrenchApp { @@ -21,6 +22,7 @@ class WrenchApp { onCloseRequest = ::exitApplication ) { Logger.info("Starting Wrench...") + Logger.info("Working Directory: ${Paths.get("").toAbsolutePath()}") UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()) MaterialTheme { WrenchScaffold(state) } } diff --git a/src/main/kotlin/xyz/atnrch/wrench/storage/LayoutStorage.kt b/src/main/kotlin/xyz/atnrch/wrench/storage/LayoutStorage.kt index a641395..b43f275 100644 --- a/src/main/kotlin/xyz/atnrch/wrench/storage/LayoutStorage.kt +++ b/src/main/kotlin/xyz/atnrch/wrench/storage/LayoutStorage.kt @@ -12,7 +12,7 @@ class LayoutStorage(private val onWatcherEntriesUpdate: (List) -> private val gson: Gson = Gson().newBuilder() .setPrettyPrinting() .create() - private val file = File("layout.json") + private val file = File("./layout.json") fun storeLayout(list: List) { val writer = FileWriter(file)