2024-09-23 16:05:05 +02:00

111 lines
4.5 KiB
Plaintext

import org.springframework.boot.gradle.tasks.bundling.BootBuildImage
plugins {
application
id("com.iqser.red.service.java-conventions")
id("org.springframework.boot") version "3.2.3"
id("io.spring.dependency-management") version "1.1.0"
id("org.sonarqube") version "4.2.1.3168"
id("io.freefair.lombok") version "8.4"
}
description = "redaction-service-server-v1"
val tenantCommonVersion = "0.30.0"
val springCommonsVersion = "2.1.0"
val storageCommonsVersion = "2.45.0"
val lifecycleCommonsVersion = "0.4.0"
val poiVersion = "5.2.3"
val metricCommonsVersion = "2.1.0"
val persistenceServiceVersion = "2.562.0-RED9348.2"
val springBootStarterVersion = "3.2.3"
configurations {
all {
exclude(group = "commons-logging", module = "commons-logging")
exclude(group = "org.springframework.boot", module = "spring-boot-starter-log4j2")
exclude(group = "com.iqser.red.commons", module = "logging-commons")
}
}
description = "redaction-report-service-server-v1"
dependencies {
implementation(project(":redaction-report-service-api-v1"))
implementation("com.iqser.red.service:persistence-service-internal-api-v1:${persistenceServiceVersion}")
implementation("com.iqser.red.service:persistence-service-shared-mongo-v1:${persistenceServiceVersion}")
implementation("com.knecon.fforesight:tenant-commons:${tenantCommonVersion}")
implementation("com.iqser.red.commons:storage-commons:${storageCommonsVersion}")
implementation("com.iqser.red.commons:spring-commons:${springCommonsVersion}")
implementation("com.iqser.red.commons:metric-commons:${metricCommonsVersion}")
implementation("com.knecon.fforesight:lifecycle-commons:${lifecycleCommonsVersion}")
implementation("com.knecon.fforesight:tracing-commons:0.5.0")
implementation("org.apache.poi:poi:${poiVersion}")
implementation("org.apache.poi:poi-ooxml:${poiVersion}")
implementation("org.apache.poi:poi-scratchpad:${poiVersion}")
implementation("org.springframework.boot:spring-boot-starter-amqp:${springBootStarterVersion}")
implementation("io.github.openfeign:feign-core:12.2")
implementation("org.springframework.cloud:spring-cloud-starter-openfeign:4.1.1")
implementation("org.apache.commons:commons-lang3:3.12.0")
implementation("org.springframework.boot:spring-boot-starter-cache:${springBootStarterVersion}")
implementation("org.springframework.boot:spring-boot-starter-data-redis:${springBootStarterVersion}")
implementation("com.github.ben-manes.caffeine:caffeine:3.1.8")
implementation("net.logstash.logback:logstash-logback-encoder:7.4")
implementation("org.springframework.boot:spring-boot-starter-logging")
implementation("ch.qos.logback:logback-classic")
testImplementation("org.springframework.boot:spring-boot-starter-test:${springBootStarterVersion}") {
exclude("org.springframework.boot:spring-boot-starter-tomcat:3.0.4")
}
testImplementation("com.iqser.red.commons:test-commons:2.1.0")
testImplementation("org.springframework.amqp:spring-rabbit-test:3.0.6")
}
tasks.named<BootBuildImage>("bootBuildImage") {
environment.put("BPE_DELIM_JAVA_TOOL_OPTIONS", " ")
environment.put("BPE_APPEND_JAVA_TOOL_OPTIONS", "-Dfile.encoding=UTF-8")
environment.put("BPE_FONTCONFIG_PATH", "/layers/fagiani_apt/apt/etc/fonts/")
val aptFile = layout.projectDirectory.file("src/main/resources/Aptfile").toString()
bindings.add("${aptFile}:/workspace/Aptfile:ro")
builder.set("paketobuildpacks/builder:base-unsafe")
buildpacks.set(
listOf(
"ghcr.io/fagiani/buildpacks/fagiani_apt@sha256:6471c8c70f32b749e29f65ae562ac0339fecad26aa9217628c00a6c31f197dae",
"urn:cnb:builder:paketo-buildpacks/java"
)
)
imageName.set("nexus.knecon.com:5001/red/${project.name}")
if (project.hasProperty("buildbootDockerHostNetwork")) {
network.set("host")
}
docker {
if (project.hasProperty("buildbootDockerHostNetwork")) {
bindHostToBuilder.set(true)
}
verboseLogging.set(true)
publishRegistry {
username.set(providers.gradleProperty("mavenUser").getOrNull())
password.set(providers.gradleProperty("mavenPassword").getOrNull())
email.set(providers.gradleProperty("mavenEmail").getOrNull())
url.set("https://nexus.knecon.com:5001/")
}
val dockerTag = "nexus.knecon.com:5001/red/${project.name}:${project.version}"
tags.set(listOf(dockerTag))
}
}