Skip to content

Commit

Permalink
♻️ refactor(build): 更新构建配置,优化Docker镜像构建和发布流程
Browse files Browse the repository at this point in the history
  • Loading branch information
vnobo committed Jul 26, 2024
1 parent 4f221d6 commit e313c67
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 46 deletions.
18 changes: 0 additions & 18 deletions boot/auth-server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,6 @@ plugins {
id 'org.hibernate.orm' version '6.5.2.Final'
}

tasks.named("bootBuildImage") {
tags = ["${dockerPrefix}/${rootProject.name}-${project.name}:latest"]
imageName = ("${dockerPrefix}/${rootProject.name}-${project.name}:${project.version}")
environment = [
"BPE_DELIM_JAVA_TOOL_OPTIONS" : " ",
"BPE_APPEND_JAVA_TOOL_OPTIONS": "-Dfile.encoding=UTF-8 " +
"-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager"
]
publish = true
docker {
publishRegistry {
username = "${dockerUsername}"
password = "${dockerPassword}"
email = "${dockerEmail}"
}
}
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
Expand Down
Binary file removed boot/auth-server/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 0 additions & 7 deletions boot/auth-server/gradle/wrapper/gradle-wrapper.properties

This file was deleted.

23 changes: 3 additions & 20 deletions boot/platform/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ plugins {
}

java {
sourceCompatibility = '21'
targetCompatibility = '21'
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}

configurations {
Expand All @@ -16,24 +17,6 @@ configurations {
}
}

tasks.named("bootBuildImage") {
tags = ["${dockerPrefix}/${rootProject.name}-${project.name}:latest"]
imageName.set("${dockerPrefix}/${rootProject.name}-${project.name}:${project.version}")
environment = [
"BPE_DELIM_JAVA_TOOL_OPTIONS" : " ",
"BPE_APPEND_JAVA_TOOL_OPTIONS": "-Dfile.encoding=UTF-8 " +
"-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager"
]
publish = true
docker {
publishRegistry {
username = "${dockerUsername}"
password = "${dockerPassword}"
email = "${dockerEmail}"
}
}
}

dependencies {

implementation("com.google.guava:guava:33.+")
Expand Down
2 changes: 1 addition & 1 deletion boot/platform/src/main/resources/application-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spring:
max-idle-time: 10m
validation-query: select 1
sql.init:
mode: never
mode: always
platform: postgres
encoding: utf-8
data.redis:
Expand Down
24 changes: 24 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,28 @@ configure(allprojects) { project ->
resolutionStrategy.cacheChangingModulesFor 0, "minutes"
}

}

configurations(subprojects) { project ->

apply plugin: "org.springframework.boot"

tasks.named("bootBuildImage") {
tags = ["${dockerPrefix}/${rootProject.name}-${project.name}:latest"]
imageName.set("${dockerPrefix}/${rootProject.name}-${project.name}:${project.version}")
environment = [
"BPE_DELIM_JAVA_TOOL_OPTIONS" : " ",
"BPE_APPEND_JAVA_TOOL_OPTIONS": "-Dfile.encoding=UTF-8 " +
"-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager"
]
publish = true
docker {
host = "//./pipe/dockerDesktopLinuxEngine"
publishRegistry {
username = "${dockerUsername}"
password = "${dockerPassword}"
email = "${dockerEmail}"
}
}
}
}

0 comments on commit e313c67

Please sign in to comment.