You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
1.9 KiB
68 lines
1.9 KiB
/* |
|
* Copyright 2012-present the original author or authors. |
|
* |
|
* Licensed under the Apache License, Version 2.0 (the License); |
|
* you may not use this file except in compliance with the License. |
|
* You may obtain a copy of the License at |
|
* |
|
* https://www.apache.org/licenses/LICENSE-2.0 |
|
* |
|
* Unless required by applicable law or agreed to in writing, software |
|
* distributed under the License is distributed on an "AS IS" BASIS, |
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
* See the License for the specific language governing permissions and |
|
* limitations under the License. |
|
*/ |
|
|
|
import org.springframework.boot.gradle.tasks.bundling.BootJar |
|
|
|
plugins { |
|
id "java" |
|
id "org.springframework.boot" |
|
} |
|
|
|
java { |
|
sourceCompatibility = '17' |
|
targetCompatibility = '17' |
|
} |
|
|
|
repositories { |
|
maven { url "file:${rootDir}/../int-test-maven-repository"} |
|
mavenCentral() |
|
spring.mavenRepositories() |
|
} |
|
|
|
configurations { |
|
app { |
|
extendsFrom(configurations.runtimeClasspath) |
|
} |
|
netty { |
|
extendsFrom(app) |
|
} |
|
tomcat { |
|
extendsFrom(app) |
|
} |
|
} |
|
|
|
dependencies { |
|
compileOnly("org.springframework:spring-webflux") |
|
|
|
implementation(platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES)) |
|
implementation("org.springframework.boot:spring-boot-starter") |
|
implementation("org.springframework.boot:spring-boot-starter-actuator") |
|
|
|
app(files(sourceSets.main.output)) |
|
app("org.springframework.boot:spring-boot-webflux") |
|
netty("org.springframework.boot:spring-boot-starter-webflux") |
|
tomcat("org.springframework.boot:spring-boot-starter-tomcat") |
|
} |
|
|
|
["netty", "tomcat"].each { webServer -> |
|
def configurer = { task -> |
|
task.mainClass = "org.springframework.boot.sni.server.SniServerApplication" |
|
task.classpath = configurations.getByName(webServer) |
|
task.archiveClassifier = webServer |
|
task.targetJavaVersion = project.java.targetCompatibility |
|
} |
|
tasks.register("${webServer}ServerApp", BootJar, configurer) |
|
} |