From f2f478fec0d5f3d304f23350a8c78f02a3f22a44 Mon Sep 17 00:00:00 2001 From: limepotato Date: Fri, 16 Feb 2024 03:19:36 -0700 Subject: [PATCH] Refactor a bit --- build.gradle.kts | 4 ++-- .../kotlin/org/bm00/{data-accessor => DataAccessor}/Config.kt | 3 +-- .../kotlin/org/bm00/{data-accessor => DataAccessor}/main.kt | 4 +++- .../{data-accessor => DataAccessor/windows}/ProgramWindow.kt | 4 +--- 4 files changed, 7 insertions(+), 8 deletions(-) rename src/main/kotlin/org/bm00/{data-accessor => DataAccessor}/Config.kt (96%) rename src/main/kotlin/org/bm00/{data-accessor => DataAccessor}/main.kt (64%) rename src/main/kotlin/org/bm00/{data-accessor => DataAccessor/windows}/ProgramWindow.kt (94%) diff --git a/build.gradle.kts b/build.gradle.kts index 3b369b1..e16da0e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -35,14 +35,14 @@ tasks { named("shadowJar") { mergeServiceFiles() manifest { - attributes(mapOf("Main-Class" to "org.bm00.data-accessor.MainKt")) + attributes(mapOf("Main-Class" to "org.bm00.DataAccessor.MainKt")) } } } val jar by tasks.getting(Jar::class) { manifest { - attributes["Main-Class"] = "org.bm00.data-accessor.MainKt" + attributes["Main-Class"] = "org.bm00.DataAccessor.MainKt" } } diff --git a/src/main/kotlin/org/bm00/data-accessor/Config.kt b/src/main/kotlin/org/bm00/DataAccessor/Config.kt similarity index 96% rename from src/main/kotlin/org/bm00/data-accessor/Config.kt rename to src/main/kotlin/org/bm00/DataAccessor/Config.kt index aa2053e..24dee83 100644 --- a/src/main/kotlin/org/bm00/data-accessor/Config.kt +++ b/src/main/kotlin/org/bm00/DataAccessor/Config.kt @@ -1,4 +1,4 @@ -package org.bm00.`data-accessor` +package org.bm00.DataAccessor import dev.dirs.ProjectDirectories import java.io.File @@ -6,7 +6,6 @@ import java.io.FileInputStream import java.io.FileOutputStream import java.io.OutputStream import java.nio.file.Files -import java.nio.file.Path import java.nio.file.Paths import java.util.* diff --git a/src/main/kotlin/org/bm00/data-accessor/main.kt b/src/main/kotlin/org/bm00/DataAccessor/main.kt similarity index 64% rename from src/main/kotlin/org/bm00/data-accessor/main.kt rename to src/main/kotlin/org/bm00/DataAccessor/main.kt index 07dc61a..bfc5bac 100644 --- a/src/main/kotlin/org/bm00/data-accessor/main.kt +++ b/src/main/kotlin/org/bm00/DataAccessor/main.kt @@ -1,8 +1,10 @@ -package org.bm00.`data-accessor` +package org.bm00.DataAccessor import jexer.TApplication +import org.bm00.DataAccessor.windows.ProgramWindow import java.util.* +// This creates a Jexer application (and calls the "backend type" which is how its rendered) class Application : TApplication(BackendType.SWING) { init { ProgramWindow(this) diff --git a/src/main/kotlin/org/bm00/data-accessor/ProgramWindow.kt b/src/main/kotlin/org/bm00/DataAccessor/windows/ProgramWindow.kt similarity index 94% rename from src/main/kotlin/org/bm00/data-accessor/ProgramWindow.kt rename to src/main/kotlin/org/bm00/DataAccessor/windows/ProgramWindow.kt index aa841f4..5452959 100644 --- a/src/main/kotlin/org/bm00/data-accessor/ProgramWindow.kt +++ b/src/main/kotlin/org/bm00/DataAccessor/windows/ProgramWindow.kt @@ -1,11 +1,9 @@ -package org.bm00.`data-accessor` +package org.bm00.DataAccessor.windows import jexer.TAction import jexer.TApplication import jexer.TWindow import jexer.layout.StretchLayoutManager -import java.io.IOException -import java.util.* class ProgramWindow private constructor(parent: TApplication, flags: Int) : TWindow(parent, "O.S.D.A.", 0, 0, 46, 10, flags) {