mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-05 20:48:22 +00:00
2c81d7f77e
This reworks how we configure the `shadow` plugin in the build. The major change is that we no longer bundle dependencies in the `compile` configuration, instead we bundle dependencies in the new `bundle` configuration. This feels more right because it is a little more "opt in" rather than "opt out" and the name of the `bundle` configuration is a little more obvious. As an neat side effect of this, the `runtimeElements` configuration used when one project depends on another now contains exactly the dependencies needed to run the project so you no longer need to reference projects that use the shadow plugin like this: ``` testCompile project(path: ':client:rest-high-level', configuration: 'shadow') ``` You can instead use the much more normal: ``` testCompile "org.elasticsearch.client:elasticsearch-rest-high-level-client:${version}" ```
36 lines
1.3 KiB
Groovy
36 lines
1.3 KiB
Groovy
Project idpFixtureProject = xpackProject("test:idp-fixture")
|
|
evaluationDependsOn(idpFixtureProject.path)
|
|
|
|
apply plugin: 'elasticsearch.standalone-test'
|
|
apply plugin: 'elasticsearch.vagrantsupport'
|
|
|
|
dependencies {
|
|
// "org.elasticsearch.plugin:x-pack-core:${version}" doesn't work with idea because the testArtifacts are also here
|
|
testCompile project(path: xpackModule('core'), configuration: 'default')
|
|
testCompile project(path: xpackModule('security'), configuration: 'testArtifacts')
|
|
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
|
|
}
|
|
|
|
task openLdapFixture {
|
|
dependsOn "vagrantCheckVersion", "virtualboxCheckVersion", idpFixtureProject.up
|
|
}
|
|
|
|
String outputDir = "${project.buildDir}/generated-resources/${project.name}"
|
|
task copyIdpTrust(type: Copy) {
|
|
from idpFixtureProject.file('src/main/resources/certs/idptrust.jks');
|
|
from idpFixtureProject.file('src/main/resources/certs/ca.crt');
|
|
into outputDir
|
|
}
|
|
if (project.rootProject.vagrantSupported) {
|
|
project.sourceSets.test.output.dir(outputDir, builtBy: copyIdpTrust)
|
|
test.dependsOn openLdapFixture
|
|
test.finalizedBy idpFixtureProject.halt
|
|
} else {
|
|
test.enabled = false
|
|
}
|
|
|
|
namingConventions {
|
|
// integ tests use Tests instead of IT
|
|
skipIntegTestInDisguise = true
|
|
}
|