mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2026-02-01 20:10:35 +01:00
Bumps [io.micrometer:micrometer-core](https://github.com/micrometer-metrics/micrometer) from 1.16.1 to 1.16.2. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/micrometer-metrics/micrometer/releases">io.micrometer:micrometer-core's releases</a>.</em></p> <blockquote> <h2>1.16.2</h2> <h2>🐞 Bug Fixes</h2> <ul> <li>CaffeineCacheMetrics nullability is incompatible with Caffeine 3.2.3 <a href="https://redirect.github.com/micrometer-metrics/micrometer/issues/6973">#6973</a></li> <li>ExecutorServiceMetrics: repeatedly logs exception when monitoring <code>ThreadPerTaskExecutor</code> without <code>--add-opens</code> <a href="https://redirect.github.com/micrometer-metrics/micrometer/issues/6726">#6726</a></li> </ul> <h2>🔨 Dependency Upgrades</h2> <ul> <li>Bump ch.qos.logback:logback-classic from 1.5.21 to 1.5.24 <a href="https://redirect.github.com/micrometer-metrics/micrometer/pull/7027">#7027</a></li> <li>Bump com.netflix.spectator:spectator-reg-atlas from 1.9.2 to 1.9.3 <a href="https://redirect.github.com/micrometer-metrics/micrometer/pull/7051">#7051</a></li> <li>Bump com.uber.nullaway:nullaway from 0.12.14 to 0.12.15 <a href="https://redirect.github.com/micrometer-metrics/micrometer/pull/7020">#7020</a></li> <li>Bump grpc from 1.76.1 to 1.76.2 <a href="https://redirect.github.com/micrometer-metrics/micrometer/pull/6952">#6952</a></li> <li>Bump maven-resolver from 1.9.24 to 1.9.25 <a href="https://redirect.github.com/micrometer-metrics/micrometer/pull/6965">#6965</a></li> <li>Bump org.apache.httpcomponents.client5:httpclient5 from 5.5.1 to 5.5.2 <a href="https://redirect.github.com/micrometer-metrics/micrometer/pull/7019">#7019</a></li> <li>Bump org.junit:junit-bom from 5.14.1 to 5.14.2 <a href="https://redirect.github.com/micrometer-metrics/micrometer/pull/7056">#7056</a></li> <li>Bump spring6 from 6.2.14 to 6.2.15 <a href="https://redirect.github.com/micrometer-metrics/micrometer/pull/6971">#6971</a></li> <li>Bump testcontainers from 1.21.3 to 1.21.4 <a href="https://redirect.github.com/micrometer-metrics/micrometer/pull/6993">#6993</a></li> </ul> <h2>❤️ Contributors</h2> <p>Thank you to all the contributors who worked on this release:</p> <p><a href="https://github.com/MariusVolkhart"><code>@MariusVolkhart</code></a> and <a href="https://github.com/izeye"><code>@izeye</code></a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="6286e854f9"><code>6286e85</code></a> Bump ch.qos.logback:logback-classic from 1.5.23 to 1.5.24 (<a href="https://redirect.github.com/micrometer-metrics/micrometer/issues/7059">#7059</a>)</li> <li><a href="5263cc740b"><code>5263cc7</code></a> Merge branch '1.15.x' into 1.16.x</li> <li><a href="0523810d0d"><code>0523810</code></a> Polish CurrentObservationTest (<a href="https://redirect.github.com/micrometer-metrics/micrometer/issues/7048">#7048</a>)</li> <li><a href="3165fdffb9"><code>3165fdf</code></a> Merge branch '1.15.x' into 1.16.x</li> <li><a href="50ba16bb3d"><code>50ba16b</code></a> Handle when ThreadPerTaskExecutor.threadCount() is not available (<a href="https://redirect.github.com/micrometer-metrics/micrometer/issues/7045">#7045</a>)</li> <li><a href="c38e88c7b2"><code>c38e88c</code></a> Bump org.junit:junit-bom from 5.14.1 to 5.14.2 (<a href="https://redirect.github.com/micrometer-metrics/micrometer/issues/7056">#7056</a>)</li> <li><a href="22ba833062"><code>22ba833</code></a> Bump com.netflix.spectator:spectator-reg-atlas from 1.9.2 to 1.9.3 (<a href="https://redirect.github.com/micrometer-metrics/micrometer/issues/7051">#7051</a>)</li> <li><a href="916ced5cbc"><code>916ced5</code></a> Merge branch '1.15.x' into 1.16.x</li> <li><a href="50d273be26"><code>50d273b</code></a> Merge branch '1.14.x' into 1.15.x</li> <li><a href="6b44cf2b21"><code>6b44cf2</code></a> Relax time limit for PushMeterRegistryTest.waitForScheduledPublishToFinish_wh...</li> <li>Additional commits viewable in <a href="https://github.com/micrometer-metrics/micrometer/compare/v1.16.1...v1.16.2">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
313 lines
11 KiB
Groovy
313 lines
11 KiB
Groovy
apply plugin: 'org.springframework.boot'
|
|
|
|
import org.apache.tools.ant.taskdefs.condition.Os
|
|
|
|
configurations {
|
|
developmentOnly
|
|
runtimeClasspath {
|
|
extendsFrom developmentOnly
|
|
}
|
|
}
|
|
|
|
spotless {
|
|
java {
|
|
target 'src/**/java/**/*.java'
|
|
targetExclude 'src/main/resources/static/**'
|
|
googleJavaFormat(googleJavaFormatVersion).aosp().reorderImports(false)
|
|
|
|
importOrder("java", "javax", "org", "com", "net", "io", "jakarta", "lombok", "me", "stirling")
|
|
toggleOffOn()
|
|
trimTrailingWhitespace()
|
|
leadingTabsToSpaces()
|
|
endWithNewline()
|
|
}
|
|
yaml {
|
|
target '**/*.yml', '**/*.yaml'
|
|
targetExclude 'src/main/resources/static/**'
|
|
trimTrailingWhitespace()
|
|
leadingTabsToSpaces()
|
|
endWithNewline()
|
|
}
|
|
format 'gradle', {
|
|
target '**/gradle/*.gradle', '**/*.gradle'
|
|
targetExclude 'src/main/resources/static/**'
|
|
trimTrailingWhitespace()
|
|
leadingTabsToSpaces()
|
|
endWithNewline()
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
if (System.getenv('STIRLING_PDF_DESKTOP_UI') != 'false'
|
|
|| (project.hasProperty('STIRLING_PDF_DESKTOP_UI')
|
|
&& project.getProperty('STIRLING_PDF_DESKTOP_UI') != 'false')) {
|
|
implementation 'org.openjfx:javafx-controls:21'
|
|
implementation 'org.openjfx:javafx-swing:21'
|
|
}
|
|
|
|
if (System.getenv('DISABLE_ADDITIONAL_FEATURES') != 'true'
|
|
|| (project.hasProperty('DISABLE_ADDITIONAL_FEATURES')
|
|
&& System.getProperty('DISABLE_ADDITIONAL_FEATURES') != 'true')) {
|
|
implementation project(':proprietary')
|
|
}
|
|
|
|
implementation project(':common')
|
|
implementation 'org.springframework.boot:spring-boot-starter-jetty'
|
|
implementation 'com.posthog.java:posthog:1.2.0'
|
|
implementation 'org.telegram:telegrambots:6.9.7.1'
|
|
implementation 'commons-io:commons-io:2.21.0'
|
|
implementation "org.bouncycastle:bcprov-jdk18on:$bouncycastleVersion"
|
|
implementation "org.bouncycastle:bcpkix-jdk18on:$bouncycastleVersion"
|
|
implementation 'io.micrometer:micrometer-core:1.16.2'
|
|
implementation 'com.google.zxing:core:3.5.4'
|
|
implementation "org.commonmark:commonmark:$commonmarkVersion" // https://mvnrepository.com/artifact/org.commonmark/commonmark
|
|
implementation "org.commonmark:commonmark-ext-gfm-tables:$commonmarkVersion"
|
|
|
|
// General PDF dependencies
|
|
implementation "org.apache.pdfbox:preflight:$pdfboxVersion"
|
|
implementation "org.apache.pdfbox:xmpbox:$pdfboxVersion"
|
|
|
|
implementation 'org.verapdf:validation-model:1.28.2'
|
|
|
|
// veraPDF still uses javax.xml.bind, not the new jakarta namespace
|
|
implementation 'javax.xml.bind:jaxb-api:2.3.1'
|
|
implementation 'com.sun.xml.bind:jaxb-impl:2.3.9'
|
|
implementation 'com.sun.xml.bind:jaxb-core:2.3.0.1'
|
|
|
|
// https://mvnrepository.com/artifact/technology.tabula/tabula
|
|
implementation ('technology.tabula:tabula:1.0.5') {
|
|
exclude group: 'org.slf4j', module: 'slf4j-simple'
|
|
exclude group: 'org.bouncycastle', module: 'bcprov-jdk15on'
|
|
exclude group: 'com.google.code.gson', module: 'gson'
|
|
}
|
|
implementation 'org.apache.pdfbox:jbig2-imageio:3.0.4'
|
|
implementation 'com.opencsv:opencsv:5.12.0' // https://mvnrepository.com/artifact/com.opencsv/opencsv
|
|
|
|
// Batik
|
|
implementation 'org.apache.xmlgraphics:batik-all:1.19'
|
|
|
|
// PDFBox Graphics2D bridge for Batik SVG to PDF conversion
|
|
implementation 'de.rototor.pdfbox:graphics2d:3.0.5'
|
|
|
|
// TwelveMonkeys
|
|
runtimeOnly "com.twelvemonkeys.imageio:imageio-batik:$imageioVersion"
|
|
runtimeOnly "com.twelvemonkeys.imageio:imageio-bmp:$imageioVersion"
|
|
runtimeOnly "com.twelvemonkeys.imageio:imageio-jpeg:$imageioVersion"
|
|
runtimeOnly "com.twelvemonkeys.imageio:imageio-tiff:$imageioVersion"
|
|
runtimeOnly "com.twelvemonkeys.imageio:imageio-webp:$imageioVersion"
|
|
// runtimeOnly "com.twelvemonkeys.imageio:imageio-hdr:$imageioVersion"
|
|
// runtimeOnly "com.twelvemonkeys.imageio:imageio-icns:$imageioVersion"
|
|
// runtimeOnly "com.twelvemonkeys.imageio:imageio-iff:$imageioVersion"
|
|
// runtimeOnly "com.twelvemonkeys.imageio:imageio-pcx:$imageioVersion@
|
|
// runtimeOnly "com.twelvemonkeys.imageio:imageio-pict:$imageioVersion"
|
|
// runtimeOnly "com.twelvemonkeys.imageio:imageio-pnm:$imageioVersion"
|
|
runtimeOnly "com.twelvemonkeys.imageio:imageio-psd:$imageioVersion"
|
|
// runtimeOnly "com.twelvemonkeys.imageio:imageio-sgi:$imageioVersion"
|
|
// runtimeOnly "com.twelvemonkeys.imageio:imageio-tga:$imageioVersion"
|
|
// runtimeOnly "com.twelvemonkeys.imageio:imageio-thumbsdb:$imageioVersion"
|
|
// runtimeOnly "com.twelvemonkeys.imageio:imageio-xwd:$imageioVersion"
|
|
|
|
developmentOnly 'org.springframework.boot:spring-boot-devtools'
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
resources {
|
|
srcDirs += ['../configs']
|
|
}
|
|
java {
|
|
if (System.getenv('STIRLING_PDF_DESKTOP_UI') == 'false') {
|
|
exclude 'stirling/software/SPDF/UI/impl/**'
|
|
}
|
|
|
|
}
|
|
}
|
|
test {
|
|
java {
|
|
if (System.getenv('STIRLING_PDF_DESKTOP_UI') == 'false') {
|
|
exclude 'stirling/software/SPDF/UI/impl/**'
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
|
|
// Disable regular jar
|
|
jar {
|
|
enabled = false
|
|
}
|
|
|
|
// Configure and enable bootJar for this project
|
|
bootJar {
|
|
enabled = true
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
zip64 = true
|
|
|
|
// Don't include all dependencies directly like the old jar task did
|
|
// from {
|
|
// configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
|
|
// }
|
|
|
|
// Exclude signature files to prevent "Invalid signature file digest" errors
|
|
exclude 'META-INF/*.SF'
|
|
exclude 'META-INF/*.DSA'
|
|
exclude 'META-INF/*.RSA'
|
|
exclude 'META-INF/*.EC'
|
|
|
|
manifest {
|
|
attributes(
|
|
'Implementation-Title': 'Stirling-PDF',
|
|
'Implementation-Version': project.version
|
|
)
|
|
}
|
|
}
|
|
|
|
// Configure main class for Spring Boot
|
|
springBoot {
|
|
mainClass = 'stirling.software.SPDF.SPDFApplication'
|
|
}
|
|
|
|
// Frontend build tasks - only enabled with -PbuildWithFrontend=true
|
|
def buildWithFrontend = project.hasProperty('buildWithFrontend') && project.property('buildWithFrontend') == 'true'
|
|
def frontendDir = file('../../frontend')
|
|
def frontendDistDir = file('../../frontend/dist')
|
|
def resourcesStaticDir = file('src/main/resources/static')
|
|
def generatedFrontendPaths = [
|
|
'assets',
|
|
'index.html',
|
|
'locales',
|
|
'Login',
|
|
'classic-logo',
|
|
'modern-logo',
|
|
'og_images',
|
|
'samples',
|
|
'manifest-classic.json'
|
|
]
|
|
|
|
tasks.register('npmInstall', Exec) {
|
|
enabled = buildWithFrontend
|
|
group = 'frontend'
|
|
description = 'Install frontend dependencies'
|
|
workingDir frontendDir
|
|
commandLine = Os.isFamily(Os.FAMILY_WINDOWS) ? ['cmd', '/c', 'npm', 'ci', '--prefer-offline'] : ['npm', 'ci', '--prefer-offline']
|
|
inputs.file(new File(frontendDir, 'package.json'))
|
|
inputs.file(new File(frontendDir, 'package-lock.json'))
|
|
outputs.dir(new File(frontendDir, 'node_modules'))
|
|
|
|
// Show live output
|
|
standardOutput = System.out
|
|
errorOutput = System.err
|
|
|
|
// Skip if node_modules exists and is up-to-date
|
|
onlyIf {
|
|
def nodeModules = new File(frontendDir, 'node_modules')
|
|
if (!nodeModules.exists()) {
|
|
println "node_modules not found, will install..."
|
|
return true
|
|
}
|
|
|
|
// if required devDependency is missing, reinstall
|
|
def iconifyPkg = new File(frontendDir, 'node_modules/@iconify-json/material-symbols/package.json')
|
|
if (!iconifyPkg.exists()) {
|
|
println "@iconify-json/material-symbols missing, will reinstall..."
|
|
return true
|
|
}
|
|
|
|
def packageJson = new File(frontendDir, 'package.json')
|
|
def packageLock = new File(frontendDir, 'package-lock.json')
|
|
def isOutdated = nodeModules.lastModified() < packageJson.lastModified() ||
|
|
nodeModules.lastModified() < packageLock.lastModified()
|
|
if (isOutdated) {
|
|
println "package.json or package-lock.json changed, will reinstall..."
|
|
} else {
|
|
println "node_modules is up-to-date, skipping npm install"
|
|
}
|
|
return isOutdated
|
|
}
|
|
|
|
doFirst {
|
|
println "Installing npm dependencies in ${frontendDir}..."
|
|
}
|
|
}
|
|
|
|
tasks.register('npmBuild', Exec) {
|
|
enabled = buildWithFrontend
|
|
group = 'frontend'
|
|
description = 'Build frontend application'
|
|
workingDir frontendDir
|
|
commandLine = Os.isFamily(Os.FAMILY_WINDOWS) ? ['cmd', '/c', 'npm', 'run', 'build'] : ['npm', 'run', 'build']
|
|
dependsOn npmInstall
|
|
inputs.dir(new File(frontendDir, 'src'))
|
|
inputs.file(new File(frontendDir, 'package.json'))
|
|
outputs.dir(frontendDistDir)
|
|
|
|
// Show live output
|
|
standardOutput = System.out
|
|
errorOutput = System.err
|
|
|
|
// Override VITE_API_BASE_URL to use relative paths for production builds
|
|
// This ensures JARs work regardless of how they're deployed (direct, proxied, etc.)
|
|
environment 'VITE_API_BASE_URL', '/'
|
|
|
|
doFirst {
|
|
println "Building frontend application for production (VITE_API_BASE_URL=/)"
|
|
}
|
|
}
|
|
|
|
tasks.register('copyFrontendAssets', Copy) {
|
|
enabled = buildWithFrontend
|
|
group = 'frontend'
|
|
description = 'Copy frontend build to static resources'
|
|
dependsOn npmBuild
|
|
from(frontendDistDir) {
|
|
// Exclude files that conflict with backend static resources
|
|
exclude 'robots.txt' // Backend already has this
|
|
exclude 'favicon.ico' // Backend already has this
|
|
}
|
|
into resourcesStaticDir
|
|
duplicatesStrategy = DuplicatesStrategy.INCLUDE // Let frontend overwrite when needed
|
|
doFirst {
|
|
println "Copying frontend build from ${frontendDistDir} to ${resourcesStaticDir}..."
|
|
println "Backend static resources will be preserved"
|
|
}
|
|
doLast {
|
|
println "Frontend assets copied successfully!"
|
|
}
|
|
}
|
|
|
|
tasks.register('cleanFrontendAssets', Delete) {
|
|
group = 'frontend'
|
|
description = 'Remove previously generated frontend assets from static resources'
|
|
delete generatedFrontendPaths.collect { new File(resourcesStaticDir, it) }
|
|
}
|
|
|
|
tasks.register('copyApiLandingPage', Copy) {
|
|
group = 'frontend'
|
|
description = 'Copy API landing page to index.html for backend-only mode'
|
|
from(new File(resourcesStaticDir, 'api-landing.html'))
|
|
into(resourcesStaticDir)
|
|
rename('api-landing.html', 'index.html')
|
|
dependsOn cleanFrontendAssets
|
|
doFirst {
|
|
println "Copying API landing page to index.html for backend-only mode..."
|
|
}
|
|
}
|
|
|
|
// Ensure copyFrontendAssets runs after spotless tasks
|
|
tasks.named('copyFrontendAssets').configure {
|
|
mustRunAfter tasks.matching { it.name.startsWith('spotless') }
|
|
}
|
|
|
|
if (buildWithFrontend) {
|
|
println "Frontend build enabled - JAR will include React frontend"
|
|
processResources.dependsOn copyFrontendAssets
|
|
} else {
|
|
println "Frontend build disabled - JAR will be backend-only with API landing page"
|
|
// When not building the UI, ensure any stale frontend assets are removed and use API landing page
|
|
processResources.dependsOn copyApiLandingPage
|
|
}
|
|
|
|
bootJar.dependsOn ':common:jar'
|
|
bootJar.dependsOn ':proprietary:jar'
|