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.
92 lines
2.7 KiB
92 lines
2.7 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. |
|
*/ |
|
|
|
plugins { |
|
id "java-library" |
|
id "org.springframework.boot.deployed" |
|
} |
|
|
|
description = "Spring Boot Antlib" |
|
|
|
ext { |
|
antVersion = "1.10.7" |
|
} |
|
|
|
configurations { |
|
antUnit |
|
antIvy |
|
} |
|
|
|
dependencies { |
|
antUnit "org.apache.ant:ant-antunit:1.3" |
|
|
|
antIvy "org.apache.ivy:ivy:2.5.0" |
|
|
|
compileOnly(project(":loader:spring-boot-loader")) |
|
compileOnly("org.apache.ant:ant:${antVersion}") |
|
|
|
implementation(project(":loader:spring-boot-loader-tools")) |
|
implementation("org.springframework:spring-core") |
|
} |
|
|
|
tasks.register("syncIntegrationTestSources", Sync) { |
|
destinationDir = file(layout.buildDirectory.dir("it")) |
|
from file("src/it") |
|
filter(springRepositoryTransformers.ant()) |
|
} |
|
|
|
processResources { |
|
def version = project.version |
|
eachFile { |
|
filter { it.replace('${spring-boot.version}', version) } |
|
} |
|
inputs.property "version", version |
|
} |
|
|
|
tasks.register("integrationTest") { |
|
dependsOn syncIntegrationTestSources, jar |
|
def resultsDir = file(layout.buildDirectory.dir("test-results/integrationTest")) |
|
inputs.dir(file("src/it")).withPathSensitivity(PathSensitivity.RELATIVE).withPropertyName("source") |
|
inputs.files(sourceSets.main.runtimeClasspath).withNormalizer(ClasspathNormalizer).withPropertyName("classpath") |
|
outputs.dirs resultsDir |
|
doLast { |
|
ant.with { |
|
taskdef(resource: "org/apache/ant/antunit/antlib.xml", |
|
classpath: configurations.antUnit.asPath) |
|
taskdef(resource: "org/apache/ivy/ant/antlib.xml", |
|
classpath: configurations.antIvy.asPath) |
|
taskdef(resource: "org/springframework/boot/ant/antlib.xml", |
|
classpath: sourceSets.main.runtimeClasspath.asPath, |
|
uri: "antlib:org.springframework.boot.ant") |
|
ant.property(name: "ivy.class.path", value: configurations.antIvy.asPath) |
|
ant.property(name: "antunit.class.path", value: configurations.antUnit.asPath) |
|
antunit { |
|
propertyset { |
|
ant.propertyref(name: "build.compiler") |
|
ant.propertyref(name: "antunit.class.path") |
|
ant.propertyref(name: "ivy.class.path") |
|
} |
|
plainlistener() |
|
xmllistener(toDir: resultsDir) |
|
fileset(dir: layout.buildDirectory.dir("it").get().asFile.toString(), includes: "**/build.xml") |
|
} |
|
} |
|
} |
|
} |
|
|
|
check { |
|
dependsOn integrationTest |
|
}
|
|
|