From 155f9f107d5e1249d2faff5a47372fa34bd5706e Mon Sep 17 00:00:00 2001 From: Aria Moradi Date: Thu, 27 May 2021 02:07:32 +0430 Subject: [PATCH] more of package moving --- .../src/main/java/xyz/nulldev/ts/config/ApplicationRootDir.kt | 2 +- .../Config/src/main/java/xyz/nulldev/ts/config/Logging.kt | 2 +- build.gradle.kts | 2 +- scripts/resources/Tachidesk Debug Launcher.bat | 2 +- scripts/resources/Tachidesk Electron Launcher.bat | 2 +- server/src/main/kotlin/suwayomi/server/util/Browser.kt | 4 ++-- .../tachidesk/model/database/migration/lib/runMigrations.kt | 2 +- server/src/test/kotlin/suwayomi/TestExtensions.kt | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/AndroidCompat/Config/src/main/java/xyz/nulldev/ts/config/ApplicationRootDir.kt b/AndroidCompat/Config/src/main/java/xyz/nulldev/ts/config/ApplicationRootDir.kt index cc30fec..c2eecdb 100644 --- a/AndroidCompat/Config/src/main/java/xyz/nulldev/ts/config/ApplicationRootDir.kt +++ b/AndroidCompat/Config/src/main/java/xyz/nulldev/ts/config/ApplicationRootDir.kt @@ -12,7 +12,7 @@ import net.harawata.appdirs.AppDirsFactory val ApplicationRootDir: String get(): String { return System.getProperty( - "ir.armor.tachidesk.rootDir", + "suwayomi.tachidesk.rootDir", AppDirsFactory.getInstance().getUserDataDir("Tachidesk", null, null) ) } \ No newline at end of file diff --git a/AndroidCompat/Config/src/main/java/xyz/nulldev/ts/config/Logging.kt b/AndroidCompat/Config/src/main/java/xyz/nulldev/ts/config/Logging.kt index a7ea068..efb6398 100644 --- a/AndroidCompat/Config/src/main/java/xyz/nulldev/ts/config/Logging.kt +++ b/AndroidCompat/Config/src/main/java/xyz/nulldev/ts/config/Logging.kt @@ -17,4 +17,4 @@ fun setLogLevel(level: Level) { } fun debugLogsEnabled(config: Config) - = System.getProperty("ir.armor.tachidesk.debugLogsEnabled", config.getString("server.debugLogsEnabled")).toBoolean() \ No newline at end of file + = System.getProperty("suwayomi.tachidesk.debugLogsEnabled", config.getString("server.debugLogsEnabled")).toBoolean() \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 2a381c7..f8c4a24 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,7 +5,7 @@ plugins { } allprojects { - group = "ir.armor.tachidesk" + group = "suwayomi" version = "1.0" diff --git a/scripts/resources/Tachidesk Debug Launcher.bat b/scripts/resources/Tachidesk Debug Launcher.bat index d185009..f6e86c3 100644 --- a/scripts/resources/Tachidesk Debug Launcher.bat +++ b/scripts/resources/Tachidesk Debug Launcher.bat @@ -1 +1 @@ -jre\bin\java -Dir.armor.tachidesk.debugLogsEnabled=true -jar Tachidesk.jar +jre\bin\java -Dsuwayomi.tachidesk.debugLogsEnabled=true -jar Tachidesk.jar diff --git a/scripts/resources/Tachidesk Electron Launcher.bat b/scripts/resources/Tachidesk Electron Launcher.bat index 0799e8e..33defed 100644 --- a/scripts/resources/Tachidesk Electron Launcher.bat +++ b/scripts/resources/Tachidesk Electron Launcher.bat @@ -1 +1 @@ -jre\bin\javaw "-Dir.armor.tachidesk.webInterface=electron" "-Dir.armor.tachidesk.electronPath=electron/electron.exe" -jar Tachidesk.jar +jre\bin\javaw "-Dsuwayomi.tachidesk.webInterface=electron" "-Dsuwayomi.tachidesk.electronPath=electron/electron.exe" -jar Tachidesk.jar diff --git a/server/src/main/kotlin/suwayomi/server/util/Browser.kt b/server/src/main/kotlin/suwayomi/server/util/Browser.kt index 6a04cf1..3b4b501 100644 --- a/server/src/main/kotlin/suwayomi/server/util/Browser.kt +++ b/server/src/main/kotlin/suwayomi/server/util/Browser.kt @@ -18,11 +18,11 @@ object Browser { fun openInBrowser() { - val openInElectron = System.getProperty("ir.armor.tachidesk.webInterface")?.equals("electron") + val openInElectron = System.getProperty("suwayomi.tachidesk.webInterface")?.equals("electron") if (openInElectron == true) { try { - val electronPath = System.getProperty("ir.armor.tachidesk.electronPath")!! + val electronPath = System.getProperty("suwayomi.tachidesk.electronPath")!! electronInstances.add(ProcessBuilder(electronPath, appBaseUrl).start()) } catch (e: Throwable) { // cover both java.lang.Exception and java.lang.Error e.printStackTrace() diff --git a/server/src/main/kotlin/suwayomi/tachidesk/model/database/migration/lib/runMigrations.kt b/server/src/main/kotlin/suwayomi/tachidesk/model/database/migration/lib/runMigrations.kt index 7ddb60d..2a299e0 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/model/database/migration/lib/runMigrations.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/model/database/migration/lib/runMigrations.kt @@ -63,7 +63,7 @@ fun runMigrations(migrations: List, database: Database = TransactionM @OptIn(ExperimentalPathApi::class) private fun getTopLevelClasses(packageName: String): List> { - ServerConfig::class.java.getResource("/" + "ir.armor.tachidesk.model.database.migration".replace('.', '/')) + ServerConfig::class.java.getResource("/" + "suwayomi.tachidesk.model.database.migration".replace('.', '/')) val path = "/" + packageName.replace('.', '/') val uri = ServerConfig::class.java.getResource(path).toURI() diff --git a/server/src/test/kotlin/suwayomi/TestExtensions.kt b/server/src/test/kotlin/suwayomi/TestExtensions.kt index b25f9f7..5b9552d 100644 --- a/server/src/test/kotlin/suwayomi/TestExtensions.kt +++ b/server/src/test/kotlin/suwayomi/TestExtensions.kt @@ -48,7 +48,7 @@ class TestExtensions { @BeforeAll fun setup() { val dataRoot = File("tmp/TestDesk").absolutePath - System.setProperty("ir.armor.tachidesk.rootDir", dataRoot) + System.setProperty("suwayomi.tachidesk.rootDir", dataRoot) applicationSetup() setLoggingEnabled(false)