mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-16 19:33:11 +02:00
refactor: move modules under app/ directory and update file paths (#3938)
# Description of Changes - **What was changed:** - Renamed top-level directories: `stirling-pdf` → `app/core`, `common` → `app/common`, `proprietary` → `app/proprietary`. - Updated all path references in `.gitattributes`, GitHub workflows (`.github/workflows/*`), scripts (`.github/scripts/*`), `.gitignore`, Dockerfiles, license files, and template settings to reflect the new structure. - Added a new CI job `check-generateOpenApiDocs` to generate and upload OpenAPI documentation. - Removed redundant `@Autowired` annotations from `TempFileShutdownHook` and `UnlockPDFFormsController`. - Minor formatting and comment adjustments in YAML templates and resource files. - **Why the change was made:** - To introduce a clear `app/` directory hierarchy for core, common, and proprietary modules, improving organization and maintainability. - To ensure continuous integration and Docker builds continue to work seamlessly with the reorganized structure. - To automate OpenAPI documentation generation as part of the CI pipeline. --- ## Checklist ### General - [x] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [x] I have read the [Stirling-PDF Developer Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md) (if applicable) - [ ] I have read the [How to add new languages to Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md) (if applicable) - [x] I have performed a self-review of my own code - [x] My changes generate no new warnings ### Documentation - [ ] I have updated relevant docs on [Stirling-PDF's doc repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/) (if functionality has heavily changed) - [ ] I have read the section [Add New Translation Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md#add-new-translation-tags) (for new translation tags only) ### UI Changes (if applicable) - [ ] Screenshots or videos demonstrating the UI changes are attached (e.g., as comments or direct attachments in the PR) ### Testing (if applicable) - [ ] I have tested my changes locally. Refer to the [Testing Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md#6-testing) for more details.
This commit is contained in:
+10
-9
@@ -66,7 +66,7 @@ allprojects {
|
||||
}
|
||||
|
||||
tasks.register('writeVersion') {
|
||||
def propsFile = file("$projectDir/common/src/main/resources/version.properties")
|
||||
def propsFile = file("$projectDir/app/common/src/main/resources/version.properties")
|
||||
def propsDir = propsFile.parentFile
|
||||
|
||||
doLast {
|
||||
@@ -209,7 +209,8 @@ tasks.withType(JavaCompile).configureEach {
|
||||
licenseReport {
|
||||
projects = [project]
|
||||
renderers = [new JsonReportRenderer()]
|
||||
allowedLicensesFile = new File("$projectDir/allowed-licenses.json")
|
||||
allowedLicensesFile = project.layout.projectDirectory.file("app/allowed-licenses.json").asFile
|
||||
outputDir = project.layout.buildDirectory.dir("reports/dependency-license").get().asFile.path
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
@@ -260,14 +261,14 @@ static def getMacVersion(String version) {
|
||||
|
||||
jpackage {
|
||||
dependsOn(":stirling-pdf:bootJar")
|
||||
input = layout.projectDirectory.dir("stirling-pdf/build/libs")
|
||||
input = layout.projectDirectory.dir("app/core/build/libs")
|
||||
destination = layout.projectDirectory.dir("build/jpackage")
|
||||
mainJar = "Stirling-PDF-${project.version}.jar"
|
||||
appName = "Stirling PDF"
|
||||
appVersion = project.version
|
||||
vendor = "Stirling PDF Inc"
|
||||
appDescription = "Stirling PDF - Your Local PDF Editor"
|
||||
icon = layout.projectDirectory.file("stirling-pdf/src/main/resources/static/favicon.ico")
|
||||
icon = layout.projectDirectory.file("app/core/src/main/resources/static/favicon.ico")
|
||||
verbose = true
|
||||
// mainClass = "org.springframework.boot.loader.launch.JarLauncher"
|
||||
|
||||
@@ -309,7 +310,7 @@ jpackage {
|
||||
// MacOS-specific configuration
|
||||
mac {
|
||||
appVersion = getMacVersion(project.version.toString())
|
||||
icon = layout.projectDirectory.file("stirling-pdf/src/main/resources/static/favicon.icns")
|
||||
icon = layout.projectDirectory.file("app/core/src/main/resources/static/favicon.icns")
|
||||
type = ImageType.DMG
|
||||
macPackageIdentifier = "Stirling PDF"
|
||||
macPackageName = "Stirling PDF"
|
||||
@@ -331,7 +332,7 @@ jpackage {
|
||||
// Linux-specific configuration
|
||||
linux {
|
||||
appVersion = project.version
|
||||
icon = layout.projectDirectory.file("stirling-pdf/src/main/resources/static/favicon.png")
|
||||
icon = layout.projectDirectory.file("app/core/src/main/resources/static/favicon.png")
|
||||
type = ImageType.DEB // Can also use "rpm" for Red Hat-based systems
|
||||
|
||||
// Debian package configuration
|
||||
@@ -403,12 +404,12 @@ tasks.register('jpackageMacX64') {
|
||||
commandLine 'jpackage',
|
||||
'--type', 'dmg',
|
||||
'--name', 'Stirling PDF (x86_64)',
|
||||
'--input', 'stirling-pdf/build/libs',
|
||||
'--input', 'app/core/build/libs',
|
||||
'--main-jar', "Stirling-PDF-${project.version}.jar",
|
||||
'--main-class', 'org.springframework.boot.loader.launch.JarLauncher',
|
||||
'--runtime-image', file(jrePath + "/zulu-17.jre/Contents/Home"),
|
||||
'--dest', 'build/jpackage/x86_64',
|
||||
'--icon', 'stirling-pdf/src/main/resources/static/favicon.icns',
|
||||
'--icon', 'app/core/src/main/resources/static/favicon.icns',
|
||||
'--app-version', getMacVersion(project.version.toString()),
|
||||
'--mac-package-name', 'Stirling PDF (x86_64)',
|
||||
'--mac-package-identifier', 'Stirling PDF (x86_64)',
|
||||
@@ -494,7 +495,7 @@ tasks.register('cleanTempJre') {
|
||||
}
|
||||
|
||||
launch4j {
|
||||
icon = "${projectDir}/stirling-pdf/src/main/resources/static/favicon.ico"
|
||||
icon = "${projectDir}/app/core/src/main/resources/static/favicon.ico"
|
||||
|
||||
outfile="Stirling-PDF.exe"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user