feat: include modules and put layout file in working folder

This commit is contained in:
aro 2023-01-15 12:40:30 +01:00
parent 68fae30197
commit c760e15608
3 changed files with 4 additions and 1 deletions

View file

@ -33,6 +33,7 @@ compose.desktop {
application { application {
mainClass = "xyz.atnrch.wrench.WrenchApp" mainClass = "xyz.atnrch.wrench.WrenchApp"
nativeDistributions { nativeDistributions {
includeAllModules = true
targetFormats(TargetFormat.AppImage) targetFormats(TargetFormat.AppImage)
packageName = "Wrench" packageName = "Wrench"
packageVersion = "1.0.0" packageVersion = "1.0.0"

View file

@ -7,6 +7,7 @@ import androidx.compose.ui.window.application
import androidx.compose.ui.window.rememberWindowState import androidx.compose.ui.window.rememberWindowState
import xyz.atnrch.wrench.gui.WrenchScaffold import xyz.atnrch.wrench.gui.WrenchScaffold
import xyz.atnrch.wrench.logger.Logger import xyz.atnrch.wrench.logger.Logger
import java.nio.file.Paths
import javax.swing.UIManager import javax.swing.UIManager
class WrenchApp { class WrenchApp {
@ -21,6 +22,7 @@ class WrenchApp {
onCloseRequest = ::exitApplication onCloseRequest = ::exitApplication
) { ) {
Logger.info("Starting Wrench...") Logger.info("Starting Wrench...")
Logger.info("Working Directory: ${Paths.get("").toAbsolutePath()}")
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()) UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName())
MaterialTheme { WrenchScaffold(state) } MaterialTheme { WrenchScaffold(state) }
} }

View file

@ -12,7 +12,7 @@ class LayoutStorage(private val onWatcherEntriesUpdate: (List<WatcherEntry>) ->
private val gson: Gson = Gson().newBuilder() private val gson: Gson = Gson().newBuilder()
.setPrettyPrinting() .setPrettyPrinting()
.create() .create()
private val file = File("layout.json") private val file = File("./layout.json")
fun storeLayout(list: List<SerializedWatcherEntry>) { fun storeLayout(list: List<SerializedWatcherEntry>) {
val writer = FileWriter(file) val writer = FileWriter(file)