2025-06-11 17:21:37 +01:00
// Configure bootRun to disable it or point to a main class
bootRun {
enabled = false
}
2025-05-27 13:01:52 +01:00
dependencies {
2026-08-27 19:31:54 +02:00
// Security-hardening utilities (zip-slip, SSRF, filename sanitization, command injection).
// Declared as api here so core + proprietary (which depend on common) get it transitively,
// keeping it off modules that don't need it (e.g. saas).
api 'io.github.pixee:java-security-toolkit:1.2.3'
2026-06-24 10:34:59 +02:00
api "com.google.guava:guava:${guavaVersion}"
2026-02-24 21:06:32 +01:00
api 'org.springframework.boot:spring-boot-starter-webmvc'
api 'org.springframework.boot:spring-boot-starter-aspectj'
2026-04-03 13:24:41 +01:00
api 'com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:20260313.1'
2025-05-27 19:55:15 +01:00
api 'com.fathzer:javaluator:3.0.6'
api 'com.posthog.java:posthog:1.2.0'
2026-06-24 10:34:59 +02:00
api "org.apache.commons:commons-lang3:${commonsLang3}"
2026-08-08 21:43:28 +01:00
api 'com.drewnoakes:metadata-extractor:2.21.0' // Image metadata extractor
2025-05-27 19:55:15 +01:00
api 'com.vladsch.flexmark:flexmark-html2md-converter:0.64.8'
api "org.apache.pdfbox:pdfbox:$pdfboxVersion"
2026-01-06 00:43:16 +01:00
api "org.apache.pdfbox:pdfbox-io:$pdfboxVersion"
2025-11-24 14:15:02 +00:00
api "org.apache.pdfbox:xmpbox:$pdfboxVersion"
api "org.apache.pdfbox:preflight:$pdfboxVersion"
2026-08-06 12:25:22 +02:00
api 'com.github.junrar:junrar:8.0.0' // RAR archive support for CBR files
2025-05-27 19:55:15 +01:00
api 'jakarta.servlet:jakarta.servlet-api:6.1.0'
2026-08-24 12:38:54 +00:00
api 'org.snakeyaml:snakeyaml-engine:3.1.1'
2026-05-05 10:35:19 +01:00
api "org.springdoc:springdoc-openapi-starter-webmvc-ui:3.0.3"
2026-01-13 22:17:40 +01:00
// Simple Java Mail for EML/MSG parsing (replaces direct Angus Mail usage)
2026-08-22 14:13:02 +00:00
api 'org.simplejavamail:simple-java-mail:9.3.2'
2026-08-27 19:31:54 +02:00
// MSG file support; exclude commons-math3 (only HSSF/formula needs it, MSG parsing doesn't)
api ( 'org.simplejavamail:outlook-module:9.3.2' ) {
exclude group: 'org.apache.commons' , module: 'commons-math3'
}
2025-09-30 11:37:50 +01:00
api 'jakarta.mail:jakarta.mail-api:2.1.5'
2025-09-30 11:41:37 +01:00
runtimeOnly 'org.eclipse.angus:angus-mail:2.0.5'
2026-05-14 17:20:45 +01:00
// Tabula table extraction — used by the shared PDF parser and directly by downstream modules.
// api-scoped so downstream modules (core, proprietary) retain it on their compile classpath.
api ( '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'
}
2026-05-21 16:05:35 +01:00
2026-06-24 10:34:59 +02:00
api "com.stirling:jpdfium:${jpdfiumVersion}"
2026-05-22 13:19:46 +01:00
2026-08-27 19:31:54 +02:00
// -PjpdfiumPlatforms=auto|all|none|<csv of linux-x64,linux-arm64,linux-musl-x64,linux-musl-arm64,darwin-x64,darwin-arm64,windows-x64> (windows-arm64 natives not published yet)
def jpdfiumPlatformsProp = ( project . findProperty ( 'jpdfiumPlatforms' ) ?: 'auto' ). toString (). trim ()
def jpdfiumAllPlatforms = [ 'linux-x64' , 'linux-arm64' , 'linux-musl-x64' , 'linux-musl-arm64' , 'darwin-x64' , 'darwin-arm64' , 'windows-x64' ]
2026-08-04 14:40:41 +01:00
def jpdfiumPlatforms
2026-08-27 19:31:54 +02:00
if ( jpdfiumPlatformsProp == 'auto' ) {
def osName = System . getProperty ( 'os.name' ). toLowerCase ()
def osArch = System . getProperty ( 'os.arch' ). toLowerCase ()
def isArm64 = osArch . contains ( 'aarch64' ) || osArch . contains ( 'arm64' )
if ( osName . contains ( 'linux' )) {
jpdfiumPlatforms = isArm64 ? [ 'linux-arm64' ] : [ 'linux-x64' ]
} else if ( osName . contains ( 'mac' )) {
jpdfiumPlatforms = isArm64 ? [ 'darwin-arm64' ] : [ 'darwin-x64' ]
} else if ( osName . contains ( 'win' )) {
if ( isArm64 ) {
logger . lifecycle ( "JPDFium natives are not available for windows-arm64; set -PjpdfiumPlatforms=none to skip bundling natives." )
jpdfiumPlatforms = []
} else {
jpdfiumPlatforms = [ 'windows-x64' ]
}
} else {
// Fallback: bundle all platforms when host can't be determined
jpdfiumPlatforms = jpdfiumAllPlatforms
}
} else if ( jpdfiumPlatformsProp == 'all' ) {
2026-08-04 14:40:41 +01:00
jpdfiumPlatforms = jpdfiumAllPlatforms
} else if ( jpdfiumPlatformsProp == 'none' ) {
jpdfiumPlatforms = []
} else {
jpdfiumPlatforms = jpdfiumPlatformsProp . split ( ',' ). collect { it . trim () }. findAll { it }
}
2026-05-22 13:19:46 +01:00
def jpdfiumInvalid = jpdfiumPlatforms . findAll { ! jpdfiumAllPlatforms . contains ( it ) }
if ( jpdfiumInvalid ) {
throw new GradleException ( "Unknown jpdfiumPlatforms value(s): ${jpdfiumInvalid.join(', ')}. " +
2026-08-27 19:31:54 +02:00
"Valid: ${jpdfiumAllPlatforms.join(', ')}, 'auto', 'all' or 'none'." )
2026-05-22 13:19:46 +01:00
}
2026-08-04 14:40:41 +01:00
logger . lifecycle ( "JPDFium native platforms: ${jpdfiumPlatforms ? jpdfiumPlatforms.join(', ') : 'none'}" )
2026-05-22 13:19:46 +01:00
jpdfiumPlatforms . each { platform ->
2026-06-24 10:34:59 +02:00
runtimeOnly "com.stirling:jpdfium-natives-${platform}:${jpdfiumVersion}"
2026-05-22 13:19:46 +01:00
}
2026-05-27 11:54:59 +01:00
// Bucket4j (local in-process token bucket for RateLimitStore default impl)
2026-06-24 10:34:59 +02:00
implementation "com.bucket4j:bucket4j_jdk17-core:${bucket4jVersion}"
2026-05-27 11:54:59 +01:00
2026-05-21 16:05:35 +01:00
// ArchUnit: enforces module dependency direction (see ArchitectureTest)
2026-06-24 10:34:59 +02:00
testImplementation "com.tngtech.archunit:archunit-junit5:${archunitVersion}"
2025-06-16 21:44:11 +02:00
}