From 0a9bfb44ce2948188516cf8148a4db0c33471c07 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Sun, 8 Jun 2025 11:47:59 +0100 Subject: [PATCH] bootRun to work at root (#3651) # Description of Changes Please provide a summary of the changes, including: - What was changed - Why the change was made - Any challenges encountered Closes #(issue_number) --- ## Checklist ### General - [ ] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [ ] I have read the [Stirling-PDF Developer Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/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/HowToAddNewLanguage.md) (if applicable) - [ ] I have performed a self-review of my own code - [ ] 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/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/DeveloperGuide.md#6-testing) for more details. --- build.gradle | 18 ++++++++++++++++-- stirling-pdf/build.gradle | 9 +++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 369082e02..e2a09809e 100644 --- a/build.gradle +++ b/build.gradle @@ -1,8 +1,8 @@ plugins { id "java" id "jacoco" - id "org.springframework.boot" version "3.5.0" id "io.spring.dependency-management" version "1.1.7" + id "org.springframework.boot" version "3.5.0" id "org.springdoc.openapi-gradle-plugin" version "1.9.0" id "io.swagger.swaggerhub" version "1.3.2" id "edu.sc.seis.launch4j" version "3.0.6" @@ -87,7 +87,6 @@ subprojects { apply plugin: 'java' apply plugin: 'java-library' apply plugin: 'com.diffplug.spotless' - apply plugin: 'org.springframework.boot' apply plugin: 'io.spring.dependency-management' java { @@ -130,6 +129,7 @@ subprojects { testImplementation 'org.springframework.boot:spring-boot-starter-test' testRuntimeOnly 'org.mockito:mockito-inline:5.2.0' + testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.12.2' } tasks.withType(JavaCompile).configureEach { @@ -500,6 +500,11 @@ swaggerhubUpload { oas = "3.0.0" // The version of the OpenAPI Specification you"re using } +dependencies { + testImplementation 'org.springframework.boot:spring-boot-starter-test' + testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.12.2' +} + tasks.named("test") { useJUnitPlatform() } @@ -545,3 +550,12 @@ tasks.register('printMacVersion') { tasks.named('generateOpenApiDocs') { doNotTrackState("Tracking state is not supported for this task") } +tasks.named('bootRun') { + group = 'application' + description = 'Delegates to :stirling-pdf:bootRun' + dependsOn ':stirling-pdf:bootRun' + + doFirst { + println "Delegating to :stirling-pdf:bootRun" + } +} diff --git a/stirling-pdf/build.gradle b/stirling-pdf/build.gradle index e182e8c0c..8e211df59 100644 --- a/stirling-pdf/build.gradle +++ b/stirling-pdf/build.gradle @@ -1,7 +1,16 @@ +apply plugin: 'org.springframework.boot' + + repositories { maven { url = 'https://build.shibboleth.net/maven/releases' } maven { url = 'https://maven.pkg.github.com/jcefmaven/jcefmaven' } } +configurations { + developmentOnly + runtimeClasspath { + extendsFrom developmentOnly + } +} dependencies { if (System.getenv('STIRLING_PDF_DESKTOP_UI') != 'false'