From 13c41be45e5902bf0e60e9745d14468c71b2497c Mon Sep 17 00:00:00 2001 From: Denis Nutiu Date: Sat, 23 Mar 2024 23:20:19 +0200 Subject: [PATCH] refactor project structure --- build.gradle | 4 ++-- src/main/java/module-info.java | 8 ++++---- .../nuculabs/imagetagger/ai}/ImageTagsPrediction.kt | 2 +- .../dev => dev/nuculabs}/imagetagger/ui/MainPage.kt | 4 ++-- .../nuculabs}/imagetagger/ui/MainPageController.kt | 6 +++--- .../imagetagger/ui/controls/ImageTagsEntryControl.kt | 2 +- .../imagetagger/ui/controls/image-tags-entry.fxml | 0 .../nuculabs}/imagetagger/ui/main-window-view.fxml | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) rename src/main/kotlin/{com/nuculabs/dev/imagetagger/tag_prediction => dev/nuculabs/imagetagger/ai}/ImageTagsPrediction.kt (99%) rename src/main/kotlin/{com/nuculabs/dev => dev/nuculabs}/imagetagger/ui/MainPage.kt (85%) rename src/main/kotlin/{com/nuculabs/dev => dev/nuculabs}/imagetagger/ui/MainPageController.kt (96%) rename src/main/kotlin/{com/nuculabs/dev => dev/nuculabs}/imagetagger/ui/controls/ImageTagsEntryControl.kt (97%) rename src/main/resources/{com/nuculabs/dev => dev/nuculabs}/imagetagger/ui/controls/image-tags-entry.fxml (100%) rename src/main/resources/{com/nuculabs/dev => dev/nuculabs}/imagetagger/ui/main-window-view.fxml (94%) diff --git a/build.gradle b/build.gradle index d920c08..28079a5 100644 --- a/build.gradle +++ b/build.gradle @@ -24,8 +24,8 @@ tasks.withType(JavaCompile) { } application { - mainModule = 'com.nuculabs.dev.imagetagger.ui' - mainClass = 'com.nuculabs.dev.imagetagger.ui.MainPage' + mainModule = 'dev.nuculabs.imagetagger.ui' + mainClass = 'dev.nuculabs.imagetagger.ui.MainPage' } kotlin { jvmToolchain( 17 ) diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java index a75803c..97bb5d6 100644 --- a/src/main/java/module-info.java +++ b/src/main/java/module-info.java @@ -1,4 +1,4 @@ -module com.nuculabs.dev.imagetagger.ui { +module dev.nuculabs.imagetagger.ui { requires javafx.controls; requires javafx.graphics; requires javafx.fxml; @@ -15,7 +15,7 @@ module com.nuculabs.dev.imagetagger.ui { requires org.kordamp.ikonli.fontawesome5; requires kotlinx.coroutines.core; - opens com.nuculabs.dev.imagetagger.ui to javafx.fxml, javafx.graphics; - opens com.nuculabs.dev.imagetagger.ui.controls to javafx.fxml, javafx.graphics; - exports com.nuculabs.dev.imagetagger.ui; + opens dev.nuculabs.imagetagger.ui to javafx.fxml, javafx.graphics; + opens dev.nuculabs.imagetagger.ui.controls to javafx.fxml, javafx.graphics; + exports dev.nuculabs.imagetagger.ui; } \ No newline at end of file diff --git a/src/main/kotlin/com/nuculabs/dev/imagetagger/tag_prediction/ImageTagsPrediction.kt b/src/main/kotlin/dev/nuculabs/imagetagger/ai/ImageTagsPrediction.kt similarity index 99% rename from src/main/kotlin/com/nuculabs/dev/imagetagger/tag_prediction/ImageTagsPrediction.kt rename to src/main/kotlin/dev/nuculabs/imagetagger/ai/ImageTagsPrediction.kt index a77a04a..85b2107 100644 --- a/src/main/kotlin/com/nuculabs/dev/imagetagger/tag_prediction/ImageTagsPrediction.kt +++ b/src/main/kotlin/dev/nuculabs/imagetagger/ai/ImageTagsPrediction.kt @@ -1,4 +1,4 @@ -package com.nuculabs.dev.imagetagger.tag_prediction +package dev.nuculabs.imagetagger.ai import ai.onnxruntime.OnnxTensor import ai.onnxruntime.OrtEnvironment diff --git a/src/main/kotlin/com/nuculabs/dev/imagetagger/ui/MainPage.kt b/src/main/kotlin/dev/nuculabs/imagetagger/ui/MainPage.kt similarity index 85% rename from src/main/kotlin/com/nuculabs/dev/imagetagger/ui/MainPage.kt rename to src/main/kotlin/dev/nuculabs/imagetagger/ui/MainPage.kt index 1038c0f..287d241 100644 --- a/src/main/kotlin/com/nuculabs/dev/imagetagger/ui/MainPage.kt +++ b/src/main/kotlin/dev/nuculabs/imagetagger/ui/MainPage.kt @@ -1,6 +1,6 @@ -package com.nuculabs.dev.imagetagger.ui +package dev.nuculabs.imagetagger.ui -import com.nuculabs.dev.imagetagger.tag_prediction.ImageTagsPrediction +import dev.nuculabs.imagetagger.ai.ImageTagsPrediction import javafx.application.Application import javafx.fxml.FXMLLoader import javafx.scene.Scene diff --git a/src/main/kotlin/com/nuculabs/dev/imagetagger/ui/MainPageController.kt b/src/main/kotlin/dev/nuculabs/imagetagger/ui/MainPageController.kt similarity index 96% rename from src/main/kotlin/com/nuculabs/dev/imagetagger/ui/MainPageController.kt rename to src/main/kotlin/dev/nuculabs/imagetagger/ui/MainPageController.kt index 7107428..e87f20c 100644 --- a/src/main/kotlin/com/nuculabs/dev/imagetagger/ui/MainPageController.kt +++ b/src/main/kotlin/dev/nuculabs/imagetagger/ui/MainPageController.kt @@ -1,7 +1,7 @@ -package com.nuculabs.dev.imagetagger.ui +package dev.nuculabs.imagetagger.ui -import com.nuculabs.dev.imagetagger.tag_prediction.ImageTagsPrediction -import com.nuculabs.dev.imagetagger.ui.controls.ImageTagsEntryControl +import dev.nuculabs.imagetagger.ai.ImageTagsPrediction +import dev.nuculabs.imagetagger.ui.controls.ImageTagsEntryControl import javafx.application.Platform import javafx.fxml.FXML import javafx.scene.control.ProgressBar diff --git a/src/main/kotlin/com/nuculabs/dev/imagetagger/ui/controls/ImageTagsEntryControl.kt b/src/main/kotlin/dev/nuculabs/imagetagger/ui/controls/ImageTagsEntryControl.kt similarity index 97% rename from src/main/kotlin/com/nuculabs/dev/imagetagger/ui/controls/ImageTagsEntryControl.kt rename to src/main/kotlin/dev/nuculabs/imagetagger/ui/controls/ImageTagsEntryControl.kt index 8670a37..ef43dcd 100644 --- a/src/main/kotlin/com/nuculabs/dev/imagetagger/ui/controls/ImageTagsEntryControl.kt +++ b/src/main/kotlin/dev/nuculabs/imagetagger/ui/controls/ImageTagsEntryControl.kt @@ -1,4 +1,4 @@ -package com.nuculabs.dev.imagetagger.ui.controls +package dev.nuculabs.imagetagger.ui.controls import javafx.fxml.FXML import javafx.fxml.FXMLLoader import javafx.scene.control.TextArea diff --git a/src/main/resources/com/nuculabs/dev/imagetagger/ui/controls/image-tags-entry.fxml b/src/main/resources/dev/nuculabs/imagetagger/ui/controls/image-tags-entry.fxml similarity index 100% rename from src/main/resources/com/nuculabs/dev/imagetagger/ui/controls/image-tags-entry.fxml rename to src/main/resources/dev/nuculabs/imagetagger/ui/controls/image-tags-entry.fxml diff --git a/src/main/resources/com/nuculabs/dev/imagetagger/ui/main-window-view.fxml b/src/main/resources/dev/nuculabs/imagetagger/ui/main-window-view.fxml similarity index 94% rename from src/main/resources/com/nuculabs/dev/imagetagger/ui/main-window-view.fxml rename to src/main/resources/dev/nuculabs/imagetagger/ui/main-window-view.fxml index 1810608..0696559 100644 --- a/src/main/resources/com/nuculabs/dev/imagetagger/ui/main-window-view.fxml +++ b/src/main/resources/dev/nuculabs/imagetagger/ui/main-window-view.fxml @@ -5,7 +5,7 @@ - +