2023-01-27 18:23:40 +00:00
|
|
|
plugins {
|
2024-06-15 12:47:16 +02:00
|
|
|
id "java"
|
2025-05-27 22:13:36 +02:00
|
|
|
id "jacoco"
|
2024-12-21 12:38:00 +00:00
|
|
|
id "io.spring.dependency-management" version "1.1.7"
|
2025-12-21 10:40:32 +00:00
|
|
|
id "org.springframework.boot" version "3.5.7"
|
2025-03-14 19:18:40 +01:00
|
|
|
id "org.springdoc.openapi-gradle-plugin" version "1.9.0"
|
2023-12-29 21:34:36 -05:00
|
|
|
id "io.swagger.swaggerhub" version "1.3.2"
|
2025-12-21 10:40:32 +00:00
|
|
|
id "com.diffplug.spotless" version "8.1.0"
|
|
|
|
|
id "com.github.jk1.dependency-license-report" version "3.0.1"
|
2025-01-18 21:07:08 +01:00
|
|
|
//id "nebula.lint" version "19.0.3"
|
2025-12-29 15:53:23 +00:00
|
|
|
id "org.sonarqube" version "7.2.2.6593"
|
2023-01-27 18:23:40 +00:00
|
|
|
}
|
|
|
|
|
|
2024-01-03 23:01:33 +00:00
|
|
|
import com.github.jk1.license.render.*
|
2025-12-11 12:13:54 +01:00
|
|
|
import groovy.json.JsonOutput
|
|
|
|
|
import groovy.json.JsonSlurper
|
2024-01-03 23:01:33 +00:00
|
|
|
|
2024-06-15 12:47:16 +02:00
|
|
|
ext {
|
2025-12-21 10:40:32 +00:00
|
|
|
springBootVersion = "3.5.7"
|
|
|
|
|
pdfboxVersion = "3.0.6"
|
2025-12-24 22:13:38 +00:00
|
|
|
imageioVersion = "3.13.0"
|
2025-09-28 16:38:13 +01:00
|
|
|
lombokVersion = "1.18.42"
|
2025-12-22 15:45:11 +00:00
|
|
|
bouncycastleVersion = "1.83"
|
2025-12-21 10:40:32 +00:00
|
|
|
springSecuritySamlVersion = "6.5.6"
|
2024-12-16 14:03:38 +00:00
|
|
|
openSamlVersion = "4.3.2"
|
2025-12-21 10:40:32 +00:00
|
|
|
commonmarkVersion = "0.27.0"
|
2025-08-03 00:14:03 +02:00
|
|
|
googleJavaFormatVersion = "1.28.0"
|
2025-12-24 22:12:10 +00:00
|
|
|
logback = "1.5.23"
|
2025-08-08 13:52:51 +02:00
|
|
|
junitPlatformVersion = "1.12.2"
|
2024-06-15 12:47:16 +02:00
|
|
|
}
|
2024-05-18 23:59:40 +01:00
|
|
|
|
2025-08-20 16:38:21 +02:00
|
|
|
ext.isSecurityDisabled = { ->
|
|
|
|
|
System.getenv('DOCKER_ENABLE_SECURITY') == 'false' ||
|
|
|
|
|
System.getenv('DISABLE_ADDITIONAL_FEATURES') == 'true' ||
|
|
|
|
|
(project.hasProperty('DISABLE_ADDITIONAL_FEATURES') &&
|
|
|
|
|
System.getProperty('DISABLE_ADDITIONAL_FEATURES') == 'true')
|
|
|
|
|
}
|
|
|
|
|
|
2025-06-09 12:51:41 +01:00
|
|
|
jar {
|
|
|
|
|
enabled = false
|
|
|
|
|
manifest {
|
|
|
|
|
attributes "Implementation-Title": "Stirling-PDF",
|
|
|
|
|
"Implementation-Version": project.version
|
|
|
|
|
}
|
2024-08-03 14:18:51 +02:00
|
|
|
}
|
2023-01-27 18:23:40 +00:00
|
|
|
|
2025-06-09 12:51:41 +01:00
|
|
|
bootJar {
|
|
|
|
|
enabled = false
|
|
|
|
|
}
|
|
|
|
|
|
2025-07-08 18:04:25 +01:00
|
|
|
// Configure main class for the root project
|
|
|
|
|
springBoot {
|
|
|
|
|
mainClass = 'stirling.software.SPDF.SPDFApplication'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
|
mavenCentral()
|
|
|
|
|
maven { url = 'https://build.shibboleth.net/maven/releases' }
|
|
|
|
|
}
|
|
|
|
|
|
2025-06-09 12:51:41 +01:00
|
|
|
allprojects {
|
|
|
|
|
group = 'stirling.software'
|
2025-12-24 20:56:22 +00:00
|
|
|
version = '2.2.0'
|
2025-06-09 12:51:41 +01:00
|
|
|
|
|
|
|
|
configurations.configureEach {
|
|
|
|
|
exclude group: 'commons-logging', module: 'commons-logging'
|
|
|
|
|
exclude group: "org.springframework.boot", module: "spring-boot-starter-tomcat"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-11 12:13:54 +01:00
|
|
|
def writeIfChanged(File targetFile, String newContent) {
|
|
|
|
|
if (targetFile.getText('UTF-8') != newContent) {
|
|
|
|
|
targetFile.write(newContent, 'UTF-8')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
def updateTauriConfigVersion(String version) {
|
|
|
|
|
File tauriConfig = file('frontend/src-tauri/tauri.conf.json')
|
|
|
|
|
def parsed = new JsonSlurper().parse(tauriConfig)
|
|
|
|
|
parsed.version = version
|
|
|
|
|
|
|
|
|
|
def formatted = JsonOutput.prettyPrint(JsonOutput.toJson(parsed)) + System.lineSeparator()
|
|
|
|
|
writeIfChanged(tauriConfig, formatted)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
def updateSimulationVersion(File fileToUpdate, String version) {
|
|
|
|
|
def content = fileToUpdate.getText('UTF-8')
|
|
|
|
|
def matcher = content =~ /(appVersion:\s*')([^']*)(')/
|
|
|
|
|
|
|
|
|
|
if (!matcher.find()) {
|
|
|
|
|
throw new GradleException("Could not locate appVersion in ${fileToUpdate} for synchronization")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
def updatedContent = matcher.replaceFirst("${matcher.group(1)}${version}${matcher.group(3)}")
|
|
|
|
|
writeIfChanged(fileToUpdate, updatedContent)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tasks.register('syncAppVersion') {
|
|
|
|
|
group = 'versioning'
|
|
|
|
|
description = 'Synchronizes app version across desktop and simulation configs.'
|
|
|
|
|
|
|
|
|
|
doLast {
|
|
|
|
|
def appVersion = project.version.toString()
|
|
|
|
|
println "Synchronizing application version to ${appVersion}"
|
|
|
|
|
updateTauriConfigVersion(appVersion)
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
|
'frontend/src/core/testing/serverExperienceSimulations.ts',
|
|
|
|
|
'frontend/src/proprietary/testing/serverExperienceSimulations.ts'
|
|
|
|
|
].each { path ->
|
|
|
|
|
updateSimulationVersion(file(path), appVersion)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-08-08 11:36:30 +02:00
|
|
|
tasks.register('writeVersion', WriteProperties) {
|
2025-08-24 22:45:26 +02:00
|
|
|
destinationFile = layout.projectDirectory.file('app/common/src/main/resources/version.properties')
|
|
|
|
|
println "Writing version.properties to ${destinationFile.get().asFile.path}"
|
2025-08-09 16:09:50 +02:00
|
|
|
comment = "${new Date()}"
|
2025-08-08 11:36:30 +02:00
|
|
|
property 'version', project.provider { project.version.toString() }
|
2025-06-18 13:11:14 +01:00
|
|
|
}
|
|
|
|
|
|
2025-06-09 12:51:41 +01:00
|
|
|
subprojects {
|
|
|
|
|
apply plugin: 'java'
|
|
|
|
|
apply plugin: 'java-library'
|
|
|
|
|
apply plugin: 'com.diffplug.spotless'
|
|
|
|
|
apply plugin: 'org.springframework.boot'
|
|
|
|
|
apply plugin: 'io.spring.dependency-management'
|
2025-08-08 13:52:51 +02:00
|
|
|
apply plugin: 'jacoco'
|
2025-06-09 12:51:41 +01:00
|
|
|
|
|
|
|
|
java {
|
|
|
|
|
// 17 is lowest but we support and recommend 21
|
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
|
|
|
}
|
|
|
|
|
|
2025-07-07 17:45:48 +01:00
|
|
|
if (project.name != "stirling-pdf") {
|
|
|
|
|
bootJar {
|
|
|
|
|
enabled = false
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-06-09 12:51:41 +01:00
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
|
mavenCentral()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
configurations.configureEach {
|
|
|
|
|
exclude group: 'commons-logging', module: 'commons-logging'
|
|
|
|
|
exclude group: 'org.springframework.boot', module: 'spring-boot-starter-tomcat'
|
|
|
|
|
// Exclude vulnerable BouncyCastle version used in tableau
|
|
|
|
|
exclude group: 'org.bouncycastle', module: 'bcpkix-jdk15on'
|
|
|
|
|
exclude group: 'org.bouncycastle', module: 'bcutil-jdk15on'
|
|
|
|
|
exclude group: 'org.bouncycastle', module: 'bcmail-jdk15on'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dependencyManagement {
|
|
|
|
|
imports {
|
|
|
|
|
mavenBom "org.springframework.boot:spring-boot-dependencies:$springBootVersion"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
|
implementation 'org.springframework.boot:spring-boot-starter-actuator'
|
2025-06-16 23:31:38 +01:00
|
|
|
implementation 'io.github.pixee:java-security-toolkit:1.2.2'
|
2025-06-09 12:51:41 +01:00
|
|
|
|
|
|
|
|
//tmp for security bumps
|
2025-12-21 10:40:32 +00:00
|
|
|
implementation "ch.qos.logback:logback-core:$logback"
|
|
|
|
|
implementation "ch.qos.logback:logback-classic:$logback"
|
2025-06-09 12:51:41 +01:00
|
|
|
compileOnly "org.projectlombok:lombok:$lombokVersion"
|
|
|
|
|
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
|
|
|
|
|
|
|
|
|
|
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
|
|
|
|
testRuntimeOnly 'org.mockito:mockito-inline:5.2.0'
|
2025-12-21 10:40:32 +00:00
|
|
|
testRuntimeOnly "org.junit.platform:junit-platform-launcher"
|
2025-08-09 16:09:50 +02:00
|
|
|
|
2025-12-22 15:45:30 +00:00
|
|
|
testImplementation platform("com.squareup.okhttp3:okhttp-bom:5.3.2")
|
2025-08-09 16:09:50 +02:00
|
|
|
testImplementation "com.squareup.okhttp3:mockwebserver"
|
2025-06-09 12:51:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tasks.withType(JavaCompile).configureEach {
|
|
|
|
|
options.encoding = "UTF-8"
|
2025-12-21 10:40:32 +00:00
|
|
|
if (!project.hasProperty("noSpotless")) {
|
|
|
|
|
dependsOn "spotlessApply"
|
|
|
|
|
}
|
2025-06-09 12:51:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
compileJava {
|
|
|
|
|
options.compilerArgs << "-parameters"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
test {
|
|
|
|
|
useJUnitPlatform()
|
2025-08-08 13:52:51 +02:00
|
|
|
finalizedBy jacocoTestReport
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
jacocoTestReport {
|
|
|
|
|
dependsOn test
|
|
|
|
|
reports {
|
|
|
|
|
xml.required.set(true)
|
|
|
|
|
csv.required.set(false)
|
|
|
|
|
html.required.set(true)
|
|
|
|
|
}
|
2025-06-09 12:51:41 +01:00
|
|
|
}
|
2025-07-07 14:37:35 +01:00
|
|
|
|
2025-08-09 16:09:50 +02:00
|
|
|
jacocoTestCoverageVerification {
|
|
|
|
|
dependsOn jacocoTestReport
|
|
|
|
|
violationRules {
|
|
|
|
|
rule {
|
|
|
|
|
limit {
|
|
|
|
|
minimum = 0.0
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-08-03 00:14:03 +02:00
|
|
|
tasks.named("processResources") {
|
|
|
|
|
dependsOn(rootProject.tasks.writeVersion)
|
|
|
|
|
}
|
2025-07-14 13:02:13 +02:00
|
|
|
|
|
|
|
|
if (name == 'stirling-pdf') {
|
|
|
|
|
apply plugin: 'org.springdoc.openapi-gradle-plugin'
|
|
|
|
|
|
|
|
|
|
openApi {
|
|
|
|
|
apiDocsUrl = "http://localhost:8080/v1/api-docs"
|
|
|
|
|
outputDir = file("$projectDir")
|
|
|
|
|
outputFileName = "SwaggerDoc.json"
|
|
|
|
|
waitTimeInSeconds = 60 // Increase the wait time to 60 seconds
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tasks.named("forkedSpringBootRun") {
|
|
|
|
|
dependsOn(":common:jar")
|
|
|
|
|
dependsOn(":proprietary:jar")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tasks.register("copySwaggerDoc", Copy) {
|
|
|
|
|
doNotTrackState("Writes SwaggerDoc.json to project root")
|
|
|
|
|
from(layout.projectDirectory.file("SwaggerDoc.json"))
|
|
|
|
|
into(rootProject.projectDir)
|
|
|
|
|
dependsOn("generateOpenApiDocs")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tasks.register("cleanSwaggerInBuild", Delete) {
|
|
|
|
|
doNotTrackState("Cleans up SwaggerDoc.json in build directory")
|
|
|
|
|
delete(layout.projectDirectory.file("SwaggerDoc.json"))
|
|
|
|
|
dependsOn("copySwaggerDoc")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tasks.named("copySwaggerDoc") {
|
|
|
|
|
finalizedBy("cleanSwaggerInBuild")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tasks.named("generateOpenApiDocs") {
|
|
|
|
|
finalizedBy("copySwaggerDoc")
|
|
|
|
|
doNotTrackState("OpenAPI plugin writes outside build directory")
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-01-27 18:23:40 +00:00
|
|
|
}
|
|
|
|
|
|
2025-06-11 17:21:37 +01:00
|
|
|
tasks.withType(JavaCompile).configureEach {
|
|
|
|
|
options.encoding = "UTF-8"
|
2025-08-07 11:12:09 +01:00
|
|
|
if (!project.hasProperty("noSpotless")) {
|
|
|
|
|
dependsOn "spotlessApply"
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-10-12 20:45:25 +01:00
|
|
|
|
2025-08-07 11:12:09 +01:00
|
|
|
gradle.taskGraph.whenReady { graph ->
|
|
|
|
|
if (project.hasProperty("noSpotless")) {
|
|
|
|
|
tasks.matching { it.name.startsWith("spotless") }.configureEach {
|
|
|
|
|
enabled = false
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-06-11 17:21:37 +01:00
|
|
|
}
|
|
|
|
|
|
2025-08-24 22:44:50 +02:00
|
|
|
def allProjects = ((subprojects as Set<Project>) + project) as Set<Project>
|
|
|
|
|
|
2024-01-03 23:01:33 +00:00
|
|
|
licenseReport {
|
2025-08-24 22:44:50 +02:00
|
|
|
projects = allProjects
|
2024-01-03 23:01:33 +00:00
|
|
|
renderers = [new JsonReportRenderer()]
|
2025-07-14 21:53:11 +02:00
|
|
|
allowedLicensesFile = project.layout.projectDirectory.file("app/allowed-licenses.json").asFile
|
|
|
|
|
outputDir = project.layout.buildDirectory.dir("reports/dependency-license").get().asFile.path
|
2025-08-24 22:44:50 +02:00
|
|
|
configurations = [ "productionRuntimeClasspath", "runtimeClasspath" ]
|
2024-01-03 23:01:33 +00:00
|
|
|
}
|
|
|
|
|
|
2025-07-08 18:04:25 +01:00
|
|
|
// Configure the forked spring boot run task to properly delegate to the stirling-pdf module
|
|
|
|
|
tasks.named('forkedSpringBootRun') {
|
|
|
|
|
dependsOn ':stirling-pdf:bootRun'
|
|
|
|
|
doFirst {
|
|
|
|
|
println "Delegating forkedSpringBootRun to :stirling-pdf:bootRun"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-12-29 21:34:36 -05:00
|
|
|
spotless {
|
2025-08-03 00:14:03 +02:00
|
|
|
yaml {
|
|
|
|
|
target '*.yml', '*.yaml'
|
|
|
|
|
trimTrailingWhitespace()
|
|
|
|
|
leadingTabsToSpaces()
|
|
|
|
|
endWithNewline()
|
|
|
|
|
}
|
|
|
|
|
format 'gradle', {
|
|
|
|
|
target 'build.gradle', 'settings.gradle', 'gradle/*.gradle', 'gradle/**/*.gradle'
|
2023-12-29 21:34:36 -05:00
|
|
|
trimTrailingWhitespace()
|
2025-01-17 22:18:55 +00:00
|
|
|
leadingTabsToSpaces()
|
2023-12-29 21:34:36 -05:00
|
|
|
endWithNewline()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-02-04 10:18:02 +00:00
|
|
|
sonar {
|
|
|
|
|
properties {
|
|
|
|
|
property "sonar.projectKey", "Stirling-Tools_Stirling-PDF"
|
|
|
|
|
property "sonar.organization", "stirling-tools"
|
2025-02-19 22:41:02 +01:00
|
|
|
|
2025-06-09 12:51:41 +01:00
|
|
|
property "sonar.exclusions", "**/build-wrapper-dump.json, **/src/main/java/org/apache/**, **/src/main/resources/static/pdfjs/**, **/src/main/resources/static/pdfjs-legacy/**, **/src/main/resources/static/js/thirdParty/**"
|
|
|
|
|
property "sonar.coverage.exclusions", "**/src/main/java/org/apache/**, **/src/main/resources/static/pdfjs/**, **/src/main/resources/static/pdfjs-legacy/**, **/src/main/resources/static/js/thirdParty/**"
|
|
|
|
|
property "sonar.cpd.exclusions", "**/src/main/java/org/apache/**, **/src/main/resources/static/pdfjs/**, **/src/main/resources/static/pdfjs-legacy/**, **/src/main/resources/static/js/thirdParty/**"
|
2025-02-04 10:18:02 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-03 23:21:12 +01:00
|
|
|
swaggerhubUpload {
|
2025-01-18 21:07:08 +01:00
|
|
|
// dependsOn = generateOpenApiDocs // Depends on your task generating Swagger docs
|
|
|
|
|
api = "Stirling-PDF" // The name of your API on SwaggerHub
|
2025-03-14 19:18:40 +01:00
|
|
|
owner = "${System.getenv().getOrDefault('SWAGGERHUB_USER', 'Frooodle')}" // Your SwaggerHub username (or organization name)
|
2025-01-18 21:07:08 +01:00
|
|
|
version = project.version // The version of your API
|
2025-03-14 19:18:40 +01:00
|
|
|
inputFile = file("SwaggerDoc.json") // The path to your Swagger docs
|
2025-01-18 21:07:08 +01:00
|
|
|
token = "${System.getenv("SWAGGERHUB_API_KEY")}" // Your SwaggerHub API key, passed as an environment variable
|
|
|
|
|
oas = "3.0.0" // The version of the OpenAPI Specification you"re using
|
2023-06-03 22:56:15 +01:00
|
|
|
}
|
|
|
|
|
|
2025-06-11 17:21:37 +01:00
|
|
|
dependencies {
|
2025-07-08 18:04:25 +01:00
|
|
|
implementation project(':stirling-pdf')
|
|
|
|
|
implementation project(':common')
|
2025-08-20 16:38:21 +02:00
|
|
|
if (rootProject.ext.isSecurityDisabled()) {
|
2025-07-08 18:04:25 +01:00
|
|
|
implementation project(':proprietary')
|
|
|
|
|
}
|
|
|
|
|
|
2025-06-11 17:21:37 +01:00
|
|
|
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
2025-08-08 13:52:51 +02:00
|
|
|
testRuntimeOnly "org.junit.platform:junit-platform-launcher:$junitPlatformVersion"
|
2025-08-09 16:09:50 +02:00
|
|
|
|
2025-12-22 15:45:30 +00:00
|
|
|
testImplementation platform("com.squareup.okhttp3:okhttp-bom:5.3.2")
|
2025-08-09 16:09:50 +02:00
|
|
|
testImplementation "com.squareup.okhttp3:mockwebserver"
|
2025-06-11 17:21:37 +01:00
|
|
|
}
|
|
|
|
|
|
2024-06-15 12:47:16 +02:00
|
|
|
tasks.named("test") {
|
2023-12-29 21:34:36 -05:00
|
|
|
useJUnitPlatform()
|
2023-01-27 18:23:40 +00:00
|
|
|
}
|
2025-04-02 13:37:19 +01:00
|
|
|
|
2025-06-18 13:11:14 +01:00
|
|
|
// Make sure all relevant processes depend on writeVersion
|
2025-06-09 12:51:41 +01:00
|
|
|
processResources.dependsOn(writeVersion)
|
|
|
|
|
|
|
|
|
|
tasks.register('printVersion') {
|
2024-12-13 00:59:42 +00:00
|
|
|
doLast {
|
|
|
|
|
println project.version
|
|
|
|
|
}
|
2023-01-27 18:23:40 +00:00
|
|
|
}
|
2024-12-13 00:59:42 +00:00
|
|
|
|
2025-06-11 17:21:37 +01:00
|
|
|
tasks.named('bootRun') {
|
|
|
|
|
group = 'application'
|
|
|
|
|
description = 'Delegates to :stirling-pdf:bootRun'
|
|
|
|
|
dependsOn ':stirling-pdf:bootRun'
|
|
|
|
|
|
|
|
|
|
doFirst {
|
|
|
|
|
println "Delegating to :stirling-pdf:bootRun"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tasks.named('build') {
|
|
|
|
|
group = 'build'
|
|
|
|
|
description = 'Delegates to :stirling-pdf:bootJar'
|
2025-12-11 12:13:54 +01:00
|
|
|
dependsOn ':stirling-pdf:bootJar', 'buildRestartHelper', 'syncAppVersion'
|
2025-06-11 17:21:37 +01:00
|
|
|
|
|
|
|
|
doFirst {
|
|
|
|
|
println "Delegating to :stirling-pdf:bootJar"
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-10-28 14:47:41 +00:00
|
|
|
|
|
|
|
|
// Task to compile RestartHelper.java
|
|
|
|
|
tasks.register('compileRestartHelper', JavaCompile) {
|
|
|
|
|
group = 'build'
|
|
|
|
|
description = 'Compiles the RestartHelper utility'
|
|
|
|
|
|
|
|
|
|
source = fileTree(dir: 'scripts', include: 'RestartHelper.java')
|
|
|
|
|
classpath = files()
|
|
|
|
|
destinationDirectory = file("${buildDir}/restart-helper-classes")
|
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
|
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Task to create restart-helper.jar
|
|
|
|
|
tasks.register('buildRestartHelper', Jar) {
|
|
|
|
|
group = 'build'
|
|
|
|
|
description = 'Builds the restart-helper.jar'
|
|
|
|
|
dependsOn 'compileRestartHelper'
|
|
|
|
|
|
|
|
|
|
from "${buildDir}/restart-helper-classes"
|
|
|
|
|
archiveFileName = 'restart-helper.jar'
|
|
|
|
|
destinationDirectory = file("${buildDir}/libs")
|
|
|
|
|
|
|
|
|
|
manifest {
|
|
|
|
|
attributes 'Main-Class': 'RestartHelper'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
doLast {
|
|
|
|
|
println "restart-helper.jar created at: ${destinationDirectory.get()}/restart-helper.jar"
|
|
|
|
|
}
|
|
|
|
|
}
|