From dae05cb150fcf5f8be8b4c862e9fad6fcfa1b1b2 Mon Sep 17 00:00:00 2001 From: Ludy87 Date: Sun, 13 Jul 2025 09:55:44 +0200 Subject: [PATCH] more --- .vscode/settings.json | 5 +++++ .../stirling/software/common/service/TaskManagerTest.java | 8 ++++---- lauch4jConfig.xml | 4 ++-- scripts/remove_translation_keys.sh | 4 ++-- scripts/replace_translation_line.sh | 2 +- settings.gradle | 4 ---- 6 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index f992feace..e28109709 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -79,13 +79,17 @@ ".venv*/", ".vscode/", "bin/", + "app/core/bin/", "app/common/bin/", "app/proprietary/bin/", "build/", + "app/core/build/", "app/common/build/", "app/proprietary/build/", "configs/", + "app/core/configs/", "customFiles/", + "app/core/customFiles/", "docs/", "exampleYmlFiles", "gradle/", @@ -97,6 +101,7 @@ ".git-blame-ignore-revs", ".gitattributes", ".gitignore", + "app/core/.gitignore", "app/common/.gitignore", "app/proprietary/.gitignore", ".pre-commit-config.yaml", diff --git a/app/common/src/test/java/stirling/software/common/service/TaskManagerTest.java b/app/common/src/test/java/stirling/software/common/service/TaskManagerTest.java index b2cb26dd8..5fd2dcc87 100644 --- a/app/common/src/test/java/stirling/software/common/service/TaskManagerTest.java +++ b/app/common/src/test/java/stirling/software/common/service/TaskManagerTest.java @@ -95,10 +95,10 @@ class TaskManagerTest { assertTrue(result.isComplete()); assertTrue(result.hasFiles()); assertFalse(result.hasMultipleFiles()); - + var resultFiles = result.getAllResultFiles(); assertEquals(1, resultFiles.size()); - + ResultFile resultFile = resultFiles.get(0); assertEquals(fileId, resultFile.getFileId()); assertEquals(originalFileName, resultFile.getFileName()); @@ -180,7 +180,7 @@ class TaskManagerTest { // Arrange // Mock fileStorage.getFileSize for file operations when(fileStorage.getFileSize("file-id")).thenReturn(1024L); - + // 1. Create active job String activeJobId = "active-job"; taskManager.createTask(activeJobId); @@ -232,7 +232,7 @@ class TaskManagerTest { LocalDateTime oldTime = LocalDateTime.now().minusHours(1); ReflectionTestUtils.setField(oldJob, "completedAt", oldTime); ReflectionTestUtils.setField(oldJob, "complete", true); - + // Create a ResultFile and set it using the new approach ResultFile resultFile = ResultFile.builder() .fileId("file-id") diff --git a/lauch4jConfig.xml b/lauch4jConfig.xml index 918d6eaad..8a2a402e7 100644 --- a/lauch4jConfig.xml +++ b/lauch4jConfig.xml @@ -13,7 +13,7 @@ false false - ./src/main/resources/static/favicon.ico + ./app/core/src/main/resources/static/favicon.ico BROWSER_OPEN=true Stirling-PDF @@ -33,4 +33,4 @@ Java is corrupted. Please uninstall and then install Java 17. Stirling-PDF is already running. - \ No newline at end of file + diff --git a/scripts/remove_translation_keys.sh b/scripts/remove_translation_keys.sh index 8a16f281f..c5001f590 100644 --- a/scripts/remove_translation_keys.sh +++ b/scripts/remove_translation_keys.sh @@ -8,7 +8,7 @@ fi key_to_remove="$1" -for file in ../src/main/resources/messages_*.properties; do +for file in ../app/core/src/main/resources/messages_*.properties; do # If the key ends with a dot, remove all keys starting with it if [[ "$key_to_remove" == *. ]]; then sed -i "/^${key_to_remove//./\\.}/d" "$file" @@ -17,4 +17,4 @@ for file in ../src/main/resources/messages_*.properties; do sed -i "/^${key_to_remove//./\\.}=/d" "$file" fi echo "Updated $file" -done \ No newline at end of file +done diff --git a/scripts/replace_translation_line.sh b/scripts/replace_translation_line.sh index 75f217a87..960507618 100644 --- a/scripts/replace_translation_line.sh +++ b/scripts/replace_translation_line.sh @@ -4,7 +4,7 @@ translation_key="pdfToPDFA.credit" old_value="qpdf" new_value="liibreoffice" -for file in ../src/main/resources/messages_*.properties; do +for file in ../app/core/src/main/resources/messages_*.properties; do sed -i "/^$translation_key=/s/$old_value/$new_value/" "$file" echo "Updated $file" done diff --git a/settings.gradle b/settings.gradle index 8af0ad4d9..3c6363f77 100644 --- a/settings.gradle +++ b/settings.gradle @@ -4,12 +4,8 @@ plugins { } rootProject.name = 'Stirling PDF' -// Define which subprojects exist. -// The first entry corresponds to the 'stirling-pdf' directory but is internally aliased as ':stirling-pdf': include 'stirling-pdf', 'common', 'proprietary' -// To let Gradle know where the ':stirling-pdf' module actually resides and to avoid case conflicts, -// we explicitly map the alias to the folder: project(':stirling-pdf').projectDir = file('app/core') project(':common' ).projectDir = file('app/common') project(':proprietary' ).projectDir = file('app/proprietary')