10 changed files with 0 additions and 123 deletions
@ -1,19 +0,0 @@ |
|||
/** |
|||
* 设置打包文件的运行时目标环境(target) |
|||
* 设置方式: 通过命令行 -D 传入目标环境参数 |
|||
* 打包命令如下: |
|||
* 1. gradle bootwar # 默认, target=tomcat |
|||
* 2. gradle bootwar -Dtarget=undertow # undertow, target=undertow |
|||
* 3. gradle bootwar -Dtarget=jetty # jetty, target=jetty |
|||
*/ |
|||
def target =System.getProperty("target") ?: "undertow"; |
|||
System.setProperty('target',target); |
|||
|
|||
// 根据 targetRuntime 变量的值执行实际的 build.gradle |
|||
apply from: "build-${target}.gradle" |
|||
|
|||
// 应用启动项目无需发布到仓库中 |
|||
publishPublicationPublicationToMavenRepository.enabled=false |
|||
|
|||
// 开启 docker 镜像生成任务 |
|||
jibBuildTar.enabled =true |
@ -1,15 +0,0 @@ |
|||
println "[Jetty] 环境 ......" |
|||
|
|||
configurations { |
|||
all*.exclude group: "org.springframework.boot", module: "spring-boot-starter-tomcat" |
|||
all*.exclude group: "org.apache.tomcat.embed", module: "tomcat-embed-coe" |
|||
all*.exclude group: "org.apache.tomcat.embed", module: "tomcat-embed-websocket" |
|||
} |
|||
|
|||
dependencies { |
|||
implementation("org.springframework.boot:spring-boot-starter-jetty") |
|||
|
|||
providedRuntime( |
|||
"org.springframework.boot:spring-boot-starter-jetty", |
|||
) |
|||
} |
@ -1,7 +0,0 @@ |
|||
println "[Tomcat] 环境 ......" |
|||
|
|||
dependencies { |
|||
providedRuntime( |
|||
"org.springframework.boot:spring-boot-starter-tomcat", |
|||
) |
|||
} |
@ -1,15 +0,0 @@ |
|||
println "[Undertow] 环境 ......" |
|||
|
|||
configurations { |
|||
all*.exclude group: "org.springframework.boot", module: "spring-boot-starter-tomcat" |
|||
all*.exclude group: "org.apache.tomcat.embed", module: "tomcat-embed-coe" |
|||
all*.exclude group: "org.apache.tomcat.embed", module: "tomcat-embed-websocket" |
|||
} |
|||
|
|||
dependencies { |
|||
implementation("org.springframework.boot:spring-boot-starter-undertow") |
|||
|
|||
providedRuntime( |
|||
"org.springframework.boot:spring-boot-starter-undertow", |
|||
) |
|||
} |
@ -1,8 +0,0 @@ |
|||
dependencies { |
|||
api( |
|||
"org.springframework.boot:spring-boot-starter-web", |
|||
"io.netty:netty-codec-http", |
|||
"com.google.code.gson:gson", |
|||
"org.codehaus.groovy:groovy", |
|||
) |
|||
} |
@ -1,19 +0,0 @@ |
|||
/** |
|||
* 设置打包文件的运行时目标环境(target) |
|||
* 设置方式: 通过命令行 -D 传入目标环境参数 |
|||
* 打包命令如下: |
|||
* 1. gradle bootwar # 默认, target=tomcat |
|||
* 2. gradle bootwar -Dtarget=undertow # undertow, target=undertow |
|||
* 3. gradle bootwar -Dtarget=jetty # jetty, target=jetty |
|||
*/ |
|||
def target =System.getProperty("target") ?: "undertow"; |
|||
System.setProperty('target',target); |
|||
|
|||
// 根据 targetRuntime 变量的值执行实际的 build.gradle |
|||
apply from: "build-${target}.gradle" |
|||
|
|||
// 应用启动项目无需发布到仓库中 |
|||
publishPublicationPublicationToMavenRepository.enabled=false |
|||
|
|||
// 开启 docker 镜像生成任务 |
|||
jibBuildTar.enabled =true |
@ -1,15 +0,0 @@ |
|||
println "[Jetty] 环境 ......" |
|||
|
|||
configurations { |
|||
all*.exclude group: "org.springframework.boot", module: "spring-boot-starter-tomcat" |
|||
all*.exclude group: "org.apache.tomcat.embed", module: "tomcat-embed-coe" |
|||
all*.exclude group: "org.apache.tomcat.embed", module: "tomcat-embed-websocket" |
|||
} |
|||
|
|||
dependencies { |
|||
implementation("org.springframework.boot:spring-boot-starter-jetty") |
|||
|
|||
providedRuntime( |
|||
"org.springframework.boot:spring-boot-starter-jetty", |
|||
) |
|||
} |
@ -1,7 +0,0 @@ |
|||
println "[Tomcat] 环境 ......" |
|||
|
|||
dependencies { |
|||
providedRuntime( |
|||
"org.springframework.boot:spring-boot-starter-tomcat", |
|||
) |
|||
} |
@ -1,15 +0,0 @@ |
|||
println "[Undertow] 环境 ......" |
|||
|
|||
configurations { |
|||
all*.exclude group: "org.springframework.boot", module: "spring-boot-starter-tomcat" |
|||
all*.exclude group: "org.apache.tomcat.embed", module: "tomcat-embed-coe" |
|||
all*.exclude group: "org.apache.tomcat.embed", module: "tomcat-embed-websocket" |
|||
} |
|||
|
|||
dependencies { |
|||
implementation("org.springframework.boot:spring-boot-starter-undertow") |
|||
|
|||
providedRuntime( |
|||
"org.springframework.boot:spring-boot-starter-undertow", |
|||
) |
|||
} |
Loading…
Reference in new issue