mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-07 05:28:34 +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}" ```
50 lines
1.7 KiB
Groovy
50 lines
1.7 KiB
Groovy
import com.carrotsearch.gradle.junit4.RandomizedTestingTask
|
|
import org.elasticsearch.gradle.BuildPlugin
|
|
|
|
evaluationDependsOn(xpackModule('core'))
|
|
|
|
apply plugin: 'elasticsearch.esplugin'
|
|
esplugin {
|
|
name 'x-pack-upgrade'
|
|
description 'Elasticsearch Expanded Pack Plugin - Upgrade'
|
|
classname 'org.elasticsearch.xpack.upgrade.Upgrade'
|
|
extendedPlugins = ['x-pack-core']
|
|
}
|
|
|
|
archivesBaseName = 'x-pack-upgrade'
|
|
|
|
dependencies {
|
|
// "org.elasticsearch.plugin:x-pack-core:${version}" doesn't work with idea because the testArtifacts are also here
|
|
compileOnly project(path: xpackModule('core'), configuration: 'default')
|
|
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
|
|
}
|
|
|
|
compileJava.options.compilerArgs << "-Xlint:-deprecation,-rawtypes,-serial,-try,-unchecked"
|
|
compileTestJava.options.compilerArgs << "-Xlint:-deprecation,-rawtypes,-serial,-try,-unchecked"
|
|
|
|
run {
|
|
plugin xpackModule('core')
|
|
}
|
|
|
|
integTest.enabled = false
|
|
|
|
// Instead we create a separate task to run the
|
|
// tests based on ESIntegTestCase
|
|
task internalClusterTest(type: RandomizedTestingTask,
|
|
group: JavaBasePlugin.VERIFICATION_GROUP,
|
|
description: 'Multi-node tests',
|
|
dependsOn: test.dependsOn) {
|
|
configure(BuildPlugin.commonTestConfig(project))
|
|
classpath = project.test.classpath
|
|
testClassesDirs = project.test.testClassesDirs
|
|
include '**/*IT.class'
|
|
systemProperty 'es.set.netty.runtime.available.processors', 'false'
|
|
}
|
|
check.dependsOn internalClusterTest
|
|
internalClusterTest.mustRunAfter test
|
|
|
|
// also add an "alias" task to make typing on the command line easier
|
|
task icTest {
|
|
dependsOn internalClusterTest
|
|
}
|