mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-29 01:44:36 -04:00
Make AntFixture handling task provider api compliant (#65832)
This tweaks the AntFixture handling to make it compliant with the task avoidance api. Tasks of type StandaloneRestTestTask are now generally finalised by using the typed ant stop task which allows us to remove of errorprone dependsOn overrides in StandaloneRestTestTask. As a result we also ported more task definitions in the build to task avoidance api. Next work item regarding AntFixture handling is porting AntFixture to a plain Gradle task and remove Groovy AntBuilder will allow us to port more build logic from Groovy to Java but is out of the scope of This PR.
This commit is contained in:
parent
c52f7f30fb
commit
0911d04467
11 changed files with 182 additions and 123 deletions
|
@ -33,15 +33,14 @@ esplugin {
|
|||
// No unit tests in this example
|
||||
tasks.named("test").configure { enabled = false }
|
||||
|
||||
tasks.register("exampleFixture", org.elasticsearch.gradle.test.AntFixture) {
|
||||
def fixture = tasks.register("exampleFixture", org.elasticsearch.gradle.test.AntFixture) {
|
||||
dependsOn sourceSets.javaRestTest.runtimeClasspath
|
||||
env 'CLASSPATH', "${-> project.sourceSets.javaRestTest.runtimeClasspath.asPath}"
|
||||
executable = "${BuildParams.runtimeJavaHome}/bin/java"
|
||||
args 'org.elasticsearch.example.resthandler.ExampleFixture', baseDir, 'TEST'
|
||||
}
|
||||
|
||||
javaRestTest {
|
||||
dependsOn exampleFixture
|
||||
nonInputProperties.systemProperty 'external.address', "${-> exampleFixture.addressAndPort}"
|
||||
tasks.named("javaRestTest").configure {
|
||||
dependsOn fixture
|
||||
nonInputProperties.systemProperty 'external.address', "${-> fixture.get().addressAndPort}"
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue