Files
grimmory/booklore-api/build.gradle
T
Balázs Szücs 108d94c0f7 feat(api, build): Upgrade to Java 25, Gradle 9, and Spring Boot 4, Jackson 3 (#2597)
* refactor: simplify RestTemplate and ObjectMapper configurations, add no-args constructors to progress classes

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* chore: update Gradle and Java versions in Docker configuration and build files

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* test: enhance header assertions in tests and add spring-boot-test-autoconfigure dependency

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* refactor(tests): migrate to SpringBootTest and update entity management in test cases

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* test: update test property configurations for H2 database in Healthcheck and BookOpds repository tests

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* test: clean up HealthcheckControllerTest by removing unnecessary whitespace and comments

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* test: remove unnecessary whitespace in HealthcheckControllerTest

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* chore: downgrade Flyway version from 12.0.0 to 11.14.1 in build.gradle

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* chore: downgrade Flyway version from 12.0.0 to 11.14.1 in build.gradle

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: add @DependsOn annotation for Flyway in MultipartConfig

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: add @DependsOn annotation for Flyway in LibraryService

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: add test configuration for Flyway in HealthcheckControllerTest
chore: remove unused path variable in deleteLibrary method of LibraryService

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: configure Flyway migration and update test configuration

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: enable remote debugging in bootRun configuration

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: update Flyway version and enhance ObjectMapper configuration

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: remove @DependsOn annotation for Flyway in MultipartConfig and LibraryService

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: add NoArgsConstructor and AllArgsConstructor annotations to DTO classes

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: add NoArgsConstructor and AllArgsConstructor annotations to FileProcessResult, MetadataUpdateContext, and MetadataUpdateWrapper classes

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: add DependsOnDatabaseInitialization annotation to MultipartConfig, AppSettingService, LibraryService, and JwtSecretService classes

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: add DependsOnDatabaseInitialization annotation to MultipartConfig and CronService classes

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: implement lazy initialization and thread safety for JWT secret retrieval

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: add Flyway dependency and update LibraryService initialization to use ApplicationReadyEvent

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* refactor: remove outdated comments from JwtSecretService class

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* refactor: migrate from com.fasterxml.jackson to tools.jackson for JSON processing

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* refactor: remove unused ObjectMapper bean and related imports from JacksonConfig

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: configure async support with VirtualThreadTaskExecutor in WebMvcConfig

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: enhance application performance with virtual threads and HTTP/2 support

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: add JsonSetter annotation to skip null values for triggeredByCron field

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: add triggeredByCron field to TaskCreateRequest and initialize in task management

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: enable Spring Data web support with DTO serialization in WebMvcConfig

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* refactor(UserDefaultsService): simplify class structure and remove unused methods

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* refactor(BookOpdsRepositoryDataJpaTest): simplify test setup and use TestEntityManager

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* refactor(BookOpdsRepositoryDataJpaTest): update test configuration and simplify entity persistence

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* refactor: update Jackson dependencies and migrate to Jackson 3

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* refactor(build.gradle): update jackson-annotations dependency to use Jackson 3 BOM

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* refactor(BookOpdsRepositoryDataJpaTest): remove unused ObjectMapper bean definition

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* refactor(LibraryService): simplify library deletion logic

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

---------

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2026-02-08 10:15:16 -07:00

137 lines
4.8 KiB
Groovy

plugins {
id 'java'
id 'org.springframework.boot' version '4.0.2'
id 'io.spring.dependency-management' version '1.1.7'
id 'org.hibernate.orm' version '7.2.0.Final'
id 'com.github.ben-manes.versions' version '0.53.0'
}
group = 'org.booklore'
version = '0.0.1-SNAPSHOT'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(25)
}
}
repositories {
mavenCentral()
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
dependencies {
// --- Spring Boot ---
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-websocket'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-configuration-processor'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-mail'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
// --- Reactive Streams ---
implementation 'io.projectreactor:reactor-core'
// --- Database & Migration ---
implementation 'org.mariadb.jdbc:mariadb-java-client:3.5.7'
implementation 'org.springframework.boot:spring-boot-starter-flyway'
implementation 'org.flywaydb:flyway-mysql:11.19.0'
// --- Security & Authentication ---
implementation 'io.jsonwebtoken:jjwt-api:0.13.0'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.13.0'
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.13.0'
// --- Lombok (For Clean Code) ---
compileOnly 'org.projectlombok:lombok:1.18.42'
annotationProcessor 'org.projectlombok:lombok:1.18.42'
// --- Book & Image Processing ---
implementation 'org.apache.pdfbox:pdfbox:3.0.6'
implementation 'org.apache.pdfbox:pdfbox-io:3.0.6'
implementation 'org.apache.pdfbox:xmpbox:3.0.6'
implementation 'org.apache.pdfbox:jbig2-imageio:3.0.4'
// Required for JPEG2000 support in PDFBox (not covered by TwelveMonkeys)
implementation 'com.github.jai-imageio:jai-imageio-core:1.4.0'
implementation 'com.github.jai-imageio:jai-imageio-jpeg2000:1.4.0'
// --- TwelveMonkeys ImageIO ---
implementation 'com.twelvemonkeys.imageio:imageio-jpeg:3.13.0'
implementation 'com.twelvemonkeys.imageio:imageio-tiff:3.13.0'
implementation 'com.twelvemonkeys.imageio:imageio-webp:3.13.0'
implementation 'com.twelvemonkeys.imageio:imageio-bmp:3.13.0'
implementation 'io.documentnode:epub4j-core:4.2.2'
// --- Audio Metadata (Audiobook Support) ---
implementation 'net.jthink:jaudiotagger:3.0.1'
// --- UNRAR Support ---
implementation 'com.github.junrar:junrar:7.5.7'
// --- JSON & Web Scraping ---
implementation 'org.jsoup:jsoup:1.21.2'
// --- Mapping (DTOs & Entities) ---
implementation 'org.mapstruct:mapstruct:1.6.3'
annotationProcessor 'org.mapstruct:mapstruct-processor:1.6.3'
// --- API Documentation ---
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.14'
implementation 'org.apache.commons:commons-compress:1.28.0'
implementation 'org.tukaani:xz:1.11' // Required by commons-compress for 7z support
implementation 'org.apache.commons:commons-text:1.15.0'
// --- Template Engine ---
implementation 'org.freemarker:freemarker:2.3.34'
// --- Jackson 3 ---
implementation platform('tools.jackson:jackson-bom:3.0.4')
implementation 'tools.jackson.core:jackson-core'
implementation 'tools.jackson.core:jackson-databind'
implementation 'tools.jackson.module:jackson-module-blackbird'
// --- Jackson 2 (Compatibility) ---
// jackson-annotations version is managed by Jackson 3 BOM (requires 2.20+)
implementation 'com.fasterxml.jackson.core:jackson-annotations'
// --- Caching ---
implementation 'com.github.ben-manes.caffeine:caffeine:3.2.0'
// --- Test Dependencies ---
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.boot:spring-boot-test-autoconfigure'
testImplementation 'org.assertj:assertj-core:3.27.6'
testImplementation "org.mockito:mockito-inline:5.2.0"
testRuntimeOnly 'com.h2database:h2'
}
hibernate {
enhancement {
enableAssociationManagement = true
}
}
test {
useJUnitPlatform()
jvmArgs("-XX:+EnableDynamicAgentLoading")
}
bootRun {
def debug = System.getenv('REMOTE_DEBUG_ENABLED')
if (debug.equals("true")) {
jvmArgs("-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005")
}
}
bootJar {
mainClass = 'org.booklore.BookloreApplication'
}