RED-7404 - Add BootBuildImage task for other gradle modules

This commit is contained in:
Andrei Isvoran 2023-12-06 16:33:41 +02:00
parent 7508e7667e
commit 83eb670ffb
7 changed files with 184 additions and 3 deletions

View File

@ -1,8 +1,11 @@
import org.springframework.boot.gradle.tasks.bundling.BootBuildImage
plugins {
id("com.iqser.red.service.java-conventions")
id("io.spring.dependency-management") version "1.1.3"
id("org.sonarqube") version "4.4.1.3373"
id("io.freefair.lombok") version "8.4"
id("org.springframework.boot") version "3.1.3"
}
dependencies {
@ -10,3 +13,27 @@ dependencies {
}
description = "persistence-service-external-api-impl-v1"
tasks.named<BootBuildImage>("bootBuildImage") {
environment.put("BPE_DELIM_JAVA_TOOL_OPTIONS", " ")
environment.put("BPE_APPEND_JAVA_TOOL_OPTIONS", "-Dfile.encoding=UTF-8")
imageName.set("nexus.knecon.com:5001/red/${project.name}:${project.version}")
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/")
}
}
}

View File

@ -1,5 +1,8 @@
import org.springframework.boot.gradle.tasks.bundling.BootBuildImage
plugins {
id("com.iqser.red.service.java-conventions")
id("org.springframework.boot") version "3.1.3"
}
dependencies {
@ -23,3 +26,26 @@ dependencies {
description = "persistence-service-external-api-v1"
tasks.named<BootBuildImage>("bootBuildImage") {
environment.put("BPE_DELIM_JAVA_TOOL_OPTIONS", " ")
environment.put("BPE_APPEND_JAVA_TOOL_OPTIONS", "-Dfile.encoding=UTF-8")
imageName.set("nexus.knecon.com:5001/red/${project.name}:${project.version}")
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/")
}
}
}

View File

@ -1,6 +1,9 @@
import org.springframework.boot.gradle.tasks.bundling.BootBuildImage
plugins {
id("com.iqser.red.service.java-conventions")
id("io.freefair.lombok") version "8.4"
id("org.springframework.boot") version "3.1.3"
}
dependencies {
@ -24,3 +27,27 @@ dependencies {
}
description = "persistence-service-external-api-v2"
tasks.named<BootBuildImage>("bootBuildImage") {
environment.put("BPE_DELIM_JAVA_TOOL_OPTIONS", " ")
environment.put("BPE_APPEND_JAVA_TOOL_OPTIONS", "-Dfile.encoding=UTF-8")
imageName.set("nexus.knecon.com:5001/red/${project.name}:${project.version}")
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/")
}
}
}

View File

@ -1,6 +1,9 @@
import org.springframework.boot.gradle.tasks.bundling.BootBuildImage
plugins {
id("com.iqser.red.service.java-conventions")
id("io.freefair.lombok") version "8.4"
id("org.springframework.boot") version "3.1.3"
}
dependencies {
@ -10,3 +13,26 @@ dependencies {
description = "persistence-service-internal-api-impl-v1"
tasks.named<BootBuildImage>("bootBuildImage") {
environment.put("BPE_DELIM_JAVA_TOOL_OPTIONS", " ")
environment.put("BPE_APPEND_JAVA_TOOL_OPTIONS", "-Dfile.encoding=UTF-8")
imageName.set("nexus.knecon.com:5001/red/${project.name}:${project.version}")
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/")
}
}
}

View File

@ -1,7 +1,9 @@
import org.springframework.boot.gradle.tasks.bundling.BootBuildImage
plugins {
id("com.iqser.red.service.java-conventions")
id("org.springframework.boot") version "3.1.3"
}
dependencies {
api("io.github.openfeign:feign-core:12.2")
api("org.springframework.boot:spring-boot-starter-web:3.1.3")
@ -14,3 +16,26 @@ dependencies {
description = "persistence-service-internal-api-v1"
tasks.named<BootBuildImage>("bootBuildImage") {
environment.put("BPE_DELIM_JAVA_TOOL_OPTIONS", " ")
environment.put("BPE_APPEND_JAVA_TOOL_OPTIONS", "-Dfile.encoding=UTF-8")
imageName.set("nexus.knecon.com:5001/red/${project.name}:${project.version}")
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/")
}
}
}

View File

@ -1,6 +1,9 @@
import org.springframework.boot.gradle.tasks.bundling.BootBuildImage
plugins {
id("com.iqser.red.service.java-conventions")
id("io.freefair.lombok") version "8.4"
id("org.springframework.boot") version "3.1.3"
}
val springBootStarterVersion = "3.1.3"
@ -47,6 +50,26 @@ dependencies {
description = "persistence-service-processor-v1"
java {
withJavadocJar()
tasks.named<BootBuildImage>("bootBuildImage") {
environment.put("BPE_DELIM_JAVA_TOOL_OPTIONS", " ")
environment.put("BPE_APPEND_JAVA_TOOL_OPTIONS", "-Dfile.encoding=UTF-8")
imageName.set("nexus.knecon.com:5001/red/${project.name}:${project.version}")
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/")
}
}
}

View File

@ -1,6 +1,9 @@
import org.springframework.boot.gradle.tasks.bundling.BootBuildImage
plugins {
id("com.iqser.red.service.java-conventions")
id("io.freefair.lombok") version "8.4"
id("org.springframework.boot") version "3.1.3"
}
dependencies {
@ -17,3 +20,27 @@ dependencies {
}
description = "persistence-service-shared-api-v1"
tasks.named<BootBuildImage>("bootBuildImage") {
environment.put("BPE_DELIM_JAVA_TOOL_OPTIONS", " ")
environment.put("BPE_APPEND_JAVA_TOOL_OPTIONS", "-Dfile.encoding=UTF-8")
imageName.set("nexus.knecon.com:5001/red/${project.name}:${project.version}")
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/")
}
}
}