2015-11-10 15:34:22 +08:00
|
|
|
/*
|
2021-02-03 05:41:39 +08:00
|
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
|
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
|
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
|
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
|
|
* Side Public License, v 1.
|
2015-11-10 15:34:22 +08:00
|
|
|
*/
|
2017-11-15 21:50:13 +08:00
|
|
|
|
2021-12-15 16:27:16 +08:00
|
|
|
import org.apache.tools.ant.filters.ReplaceTokens
|
|
|
|
import org.elasticsearch.gradle.internal.conventions.info.GitInfo
|
|
|
|
|
2018-06-28 20:14:34 +08:00
|
|
|
plugins {
|
|
|
|
id 'java-gradle-plugin'
|
2021-06-01 17:19:30 +08:00
|
|
|
id 'groovy-gradle-plugin'
|
2018-06-28 20:14:34 +08:00
|
|
|
id 'groovy'
|
2021-06-23 17:44:49 +08:00
|
|
|
id 'elasticsearch.build-tools'
|
2021-06-08 21:26:21 +08:00
|
|
|
id 'elasticsearch.eclipse'
|
2021-10-08 00:00:21 +08:00
|
|
|
id 'elasticsearch.versions'
|
2021-10-14 16:38:06 +08:00
|
|
|
id 'elasticsearch.formatting'
|
2018-06-28 20:14:34 +08:00
|
|
|
}
|
2015-10-30 02:40:19 +08:00
|
|
|
|
|
|
|
group = 'org.elasticsearch.gradle'
|
2016-05-07 13:22:38 +08:00
|
|
|
|
2018-11-02 11:27:40 +08:00
|
|
|
// we update the version property to reflect if we are building a snapshot or a release build
|
|
|
|
// we write this back out below to load it in the Build.java which will be shown in rest main action
|
|
|
|
// to indicate this being a snapshot build or a release build.
|
2021-10-08 00:00:21 +08:00
|
|
|
version = versions.getProperty("elasticsearch")
|
2019-05-25 04:46:59 +08:00
|
|
|
|
2021-02-17 17:04:13 +08:00
|
|
|
gradlePlugin {
|
|
|
|
// We already configure publication and we don't need or want the one that comes
|
|
|
|
// with the java-gradle-plugin
|
|
|
|
automatedPublishing = false
|
2021-05-06 20:02:35 +08:00
|
|
|
plugins {
|
|
|
|
build {
|
|
|
|
id = 'elasticsearch.build'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.BuildPlugin'
|
|
|
|
}
|
2023-11-22 03:29:27 +08:00
|
|
|
buildComplete {
|
|
|
|
id = 'elasticsearch.build-complete'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.ElasticsearchBuildCompletePlugin'
|
|
|
|
}
|
2022-03-15 18:37:47 +08:00
|
|
|
distro {
|
|
|
|
id = 'elasticsearch.distro'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.distribution.ElasticsearchDistributionPlugin'
|
|
|
|
}
|
2021-05-06 20:02:35 +08:00
|
|
|
distroTest {
|
|
|
|
id = 'elasticsearch.distro-test'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.test.DistroTestPlugin'
|
|
|
|
}
|
|
|
|
dockerSupport {
|
|
|
|
id = 'elasticsearch.docker-support'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.docker.DockerSupportPlugin'
|
|
|
|
}
|
|
|
|
docsTest {
|
|
|
|
id = 'elasticsearch.docs-test'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.doc.DocsTestPlugin'
|
|
|
|
}
|
2022-11-09 23:16:21 +08:00
|
|
|
draArtifacts {
|
|
|
|
id = 'elasticsearch.dra-artifacts'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.dra.DraResolvePlugin'
|
|
|
|
}
|
2021-05-06 20:02:35 +08:00
|
|
|
globalBuildInfo {
|
|
|
|
id = 'elasticsearch.global-build-info'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.info.GlobalBuildInfoPlugin'
|
|
|
|
}
|
|
|
|
internalAvailablePorts {
|
|
|
|
id = 'elasticsearch.internal-available-ports'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.InternalAvailableTcpPortProviderPlugin'
|
|
|
|
}
|
|
|
|
internalClusterTest {
|
|
|
|
id = 'elasticsearch.internal-cluster-test'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.test.InternalClusterTestPlugin'
|
|
|
|
}
|
|
|
|
internalDistributionArchiveCheck {
|
|
|
|
id = 'elasticsearch.internal-distribution-archive-check'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.InternalDistributionArchiveCheckPlugin'
|
|
|
|
}
|
|
|
|
internalDistributionArchiveSetup {
|
|
|
|
id = 'elasticsearch.internal-distribution-archive-setup'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.InternalDistributionArchiveSetupPlugin'
|
|
|
|
}
|
|
|
|
internalDistributionBwcSetup {
|
|
|
|
id = 'elasticsearch.internal-distribution-bwc-setup'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.InternalDistributionBwcSetupPlugin'
|
|
|
|
}
|
|
|
|
internalDistributionDownload {
|
|
|
|
id = 'elasticsearch.internal-distribution-download'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.InternalDistributionDownloadPlugin'
|
|
|
|
}
|
|
|
|
internalPlugin {
|
|
|
|
id = 'elasticsearch.internal-es-plugin'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.InternalPluginBuildPlugin'
|
|
|
|
}
|
2022-03-15 02:27:24 +08:00
|
|
|
internalBasePlugin {
|
|
|
|
id = 'elasticsearch.base-internal-es-plugin'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.BaseInternalPluginBuildPlugin'
|
|
|
|
}
|
2021-05-06 20:02:35 +08:00
|
|
|
internalTestArtifact {
|
|
|
|
id = 'elasticsearch.internal-test-artifact'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.InternalTestArtifactPlugin'
|
|
|
|
}
|
|
|
|
internalTestArtifactBase {
|
|
|
|
id = 'elasticsearch.internal-test-artifact-base'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.InternalTestArtifactBasePlugin'
|
|
|
|
}
|
|
|
|
internalTestClusters {
|
|
|
|
id = 'elasticsearch.internal-testclusters'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.InternalTestClustersPlugin'
|
|
|
|
}
|
|
|
|
internalTestRerun {
|
|
|
|
id = 'elasticsearch.internal-test-rerun'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.test.rerun.TestRerunPlugin'
|
|
|
|
}
|
2023-05-03 21:28:47 +08:00
|
|
|
javaToolChainPlugin {
|
|
|
|
id = 'elasticsearch.java-toolchain'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.toolchain.JavaToolChainResolverPlugin'
|
|
|
|
}
|
2022-05-10 15:58:43 +08:00
|
|
|
javaDoc {
|
|
|
|
id = 'elasticsearch.java-doc'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.ElasticsearchJavadocPlugin'
|
|
|
|
}
|
2021-05-06 20:02:35 +08:00
|
|
|
java {
|
|
|
|
id = 'elasticsearch.java'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.ElasticsearchJavaPlugin'
|
|
|
|
}
|
2022-12-22 07:33:46 +08:00
|
|
|
legacyInternalJavaRestTest {
|
|
|
|
id = 'elasticsearch.legacy-java-rest-test'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.test.rest.LegacyJavaRestTestPlugin'
|
|
|
|
}
|
2021-09-14 02:10:22 +08:00
|
|
|
internalJavaRestTest {
|
|
|
|
id = 'elasticsearch.internal-java-rest-test'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.test.rest.InternalJavaRestTestPlugin'
|
2021-05-06 20:02:35 +08:00
|
|
|
}
|
|
|
|
jdkDownload {
|
|
|
|
id = 'elasticsearch.jdk-download'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.JdkDownloadPlugin'
|
|
|
|
}
|
2022-05-13 15:03:57 +08:00
|
|
|
javaModulePath {
|
|
|
|
id = 'elasticsearch.java-module'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.ElasticsearchJavaModulePathPlugin'
|
|
|
|
}
|
2021-07-28 19:09:58 +08:00
|
|
|
releaseTools {
|
|
|
|
id = 'elasticsearch.release-tools'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.release.ReleaseToolsPlugin'
|
|
|
|
}
|
2021-05-06 20:02:35 +08:00
|
|
|
repositories {
|
|
|
|
id = 'elasticsearch.repositories'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.RepositoriesSetupPlugin'
|
|
|
|
}
|
|
|
|
restResources {
|
|
|
|
id = 'elasticsearch.rest-resources'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.test.rest.RestResourcesPlugin'
|
|
|
|
}
|
|
|
|
standaloneRestTest {
|
|
|
|
id = 'elasticsearch.standalone-rest-test'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.test.StandaloneRestTestPlugin'
|
|
|
|
}
|
|
|
|
standaloneTest {
|
|
|
|
id = 'elasticsearch.standalone-test'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.test.StandaloneTestPlugin'
|
|
|
|
}
|
2023-07-07 22:58:45 +08:00
|
|
|
stringTemplate {
|
|
|
|
id = 'elasticsearch.string-templates'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.StringTemplatePlugin'
|
2023-11-22 17:08:58 +08:00
|
|
|
}
|
2021-05-06 20:02:35 +08:00
|
|
|
testFixtures {
|
|
|
|
id = 'elasticsearch.test.fixtures'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.testfixtures.TestFixturesPlugin'
|
|
|
|
}
|
|
|
|
testBase {
|
|
|
|
id = 'elasticsearch.test-base'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.ElasticsearchTestBasePlugin'
|
|
|
|
}
|
|
|
|
testWithDependencies {
|
|
|
|
id = 'elasticsearch.test-with-dependencies'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.test.TestWithDependenciesPlugin'
|
|
|
|
}
|
|
|
|
testWithSsl {
|
|
|
|
id = 'elasticsearch.test-with-ssl'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.test.TestWithSslPlugin'
|
|
|
|
}
|
|
|
|
validateRestSpec {
|
|
|
|
id = 'elasticsearch.validate-rest-spec'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.precommit.ValidateRestSpecPlugin'
|
|
|
|
}
|
2022-12-22 07:33:46 +08:00
|
|
|
legacyYamlRestCompatTest {
|
|
|
|
id = 'elasticsearch.legacy-yaml-rest-compat-test'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.test.rest.compat.compat.LegacyYamlRestCompatTestPlugin'
|
|
|
|
}
|
2021-05-06 20:02:35 +08:00
|
|
|
yamlRestCompatTest {
|
|
|
|
id = 'elasticsearch.yaml-rest-compat-test'
|
2022-12-22 07:33:46 +08:00
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.test.rest.compat.compat.YamlRestCompatTestPlugin'
|
|
|
|
}
|
|
|
|
legacyYamlRestTest {
|
|
|
|
id = 'elasticsearch.legacy-yaml-rest-test'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.test.rest.LegacyYamlRestTestPlugin'
|
2021-05-06 20:02:35 +08:00
|
|
|
}
|
2023-12-05 16:30:50 +08:00
|
|
|
cacheTestFixtures {
|
|
|
|
id = 'elasticsearch.cache-test-fixtures'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.packer.CacheTestFixtureResourcesPlugin'
|
|
|
|
}
|
2021-05-06 20:02:35 +08:00
|
|
|
yamlRestTest {
|
2021-08-31 14:45:52 +08:00
|
|
|
id = 'elasticsearch.internal-yaml-rest-test'
|
|
|
|
implementationClass = 'org.elasticsearch.gradle.internal.test.rest.InternalYamlRestTestPlugin'
|
2021-05-06 20:02:35 +08:00
|
|
|
}
|
|
|
|
}
|
2021-02-17 17:04:13 +08:00
|
|
|
}
|
2016-05-07 13:22:38 +08:00
|
|
|
|
2018-10-25 15:03:23 +08:00
|
|
|
/*****************************************************************************
|
|
|
|
* Java version *
|
|
|
|
*****************************************************************************/
|
|
|
|
|
2021-10-15 02:09:25 +08:00
|
|
|
def minCompilerJava = versions.get("minimumCompilerJava")
|
2023-07-04 21:35:15 +08:00
|
|
|
java {
|
|
|
|
targetCompatibility = minCompilerJava
|
|
|
|
sourceCompatibility = minCompilerJava
|
|
|
|
}
|
2019-06-14 01:24:28 +08:00
|
|
|
|
2021-06-24 23:46:09 +08:00
|
|
|
if (JavaVersion.current() < JavaVersion.toVersion(minCompilerJava)) {
|
|
|
|
throw new GradleException("Java ${minCompilerJava} is required to build Elasticsearch but current Java is version ${JavaVersion.current()}.")
|
|
|
|
}
|
|
|
|
|
2019-06-14 01:24:28 +08:00
|
|
|
sourceSets {
|
2020-05-27 23:10:07 +08:00
|
|
|
integTest {
|
|
|
|
compileClasspath += sourceSets["main"].output + configurations["testRuntimeClasspath"]
|
|
|
|
runtimeClasspath += output + compileClasspath
|
|
|
|
}
|
2019-06-14 01:24:28 +08:00
|
|
|
}
|
|
|
|
|
2020-06-24 15:40:18 +08:00
|
|
|
tasks.withType(JavaCompile).configureEach {
|
|
|
|
options.encoding = 'UTF-8'
|
2019-06-14 01:24:28 +08:00
|
|
|
}
|
2018-10-25 15:03:23 +08:00
|
|
|
|
2021-06-01 17:19:30 +08:00
|
|
|
tasks.named('licenseHeaders').configure {
|
|
|
|
// ignore gradle generated binary script plugins
|
|
|
|
excludes << "Elasticsearch*Plugin.java"
|
|
|
|
}
|
2016-05-07 13:22:38 +08:00
|
|
|
/*****************************************************************************
|
|
|
|
* Dependencies used by the entire build *
|
|
|
|
*****************************************************************************/
|
2015-11-10 15:34:22 +08:00
|
|
|
|
2015-10-30 02:40:19 +08:00
|
|
|
repositories {
|
2021-02-25 15:36:08 +08:00
|
|
|
mavenCentral()
|
|
|
|
gradlePluginPortal()
|
2015-10-30 02:40:19 +08:00
|
|
|
}
|
|
|
|
|
2021-05-05 16:13:45 +08:00
|
|
|
configurations {
|
|
|
|
integTestRuntimeOnly.extendsFrom(testRuntimeOnly)
|
|
|
|
}
|
2022-06-20 22:26:38 +08:00
|
|
|
|
2015-10-30 02:40:19 +08:00
|
|
|
dependencies {
|
2022-01-27 16:57:47 +08:00
|
|
|
components.all(JacksonAlignmentRule)
|
2022-05-02 16:47:11 +08:00
|
|
|
constraints {
|
|
|
|
// ensuring brought asm version brought in by spock is up-to-date
|
2022-05-10 18:15:36 +08:00
|
|
|
testImplementation buildLibs.asm
|
|
|
|
integTestImplementation buildLibs.asm
|
2023-07-02 03:29:10 +08:00
|
|
|
integTestImplementation('org.ow2.asm:asm:9.5')
|
2023-04-13 22:11:51 +08:00
|
|
|
api("org.yaml:snakeyaml") {
|
|
|
|
version { strictly(versions.snakeyaml) }
|
|
|
|
}
|
2022-05-02 16:47:11 +08:00
|
|
|
}
|
2022-01-27 16:57:47 +08:00
|
|
|
// Forcefully downgrade the jackson platform as used in production
|
2022-05-10 18:15:36 +08:00
|
|
|
api enforcedPlatform(buildLibs.jackson.platform)
|
2020-06-30 15:37:09 +08:00
|
|
|
api localGroovy()
|
|
|
|
api gradleApi()
|
|
|
|
|
2021-06-01 17:19:30 +08:00
|
|
|
api "org.elasticsearch:build-conventions:$version"
|
2021-06-24 23:55:21 +08:00
|
|
|
api "org.elasticsearch.gradle:build-tools:$version"
|
2021-06-01 17:19:30 +08:00
|
|
|
|
2022-01-24 20:16:38 +08:00
|
|
|
// same version as http client transitive dep
|
2022-05-10 18:15:36 +08:00
|
|
|
api buildLibs.commons.codec
|
|
|
|
api buildLibs.apache.compress
|
|
|
|
api buildLibs.nebula.info
|
|
|
|
api buildLibs.apache.rat
|
|
|
|
api buildLibs.jna
|
|
|
|
api buildLibs.shadow.plugin
|
2023-11-22 03:29:27 +08:00
|
|
|
api buildLibs.gradle.enterprise
|
|
|
|
|
2021-04-29 15:33:28 +08:00
|
|
|
// for our ide tweaking
|
2022-05-10 18:15:36 +08:00
|
|
|
api buildLibs.idea.ext
|
2021-01-12 00:23:56 +08:00
|
|
|
// When upgrading forbidden apis, ensure dependency version is bumped in ThirdPartyPrecommitPlugin as well
|
2022-05-10 18:15:36 +08:00
|
|
|
api buildLibs.forbiddenApis
|
|
|
|
api buildLibs.docker.compose
|
|
|
|
api buildLibs.maven.model
|
2022-01-27 16:57:47 +08:00
|
|
|
// needs to match the jackson minor version in use
|
2022-05-10 18:15:36 +08:00
|
|
|
api buildLibs.json.schema.validator
|
|
|
|
api buildLibs.jackson.dataformat.yaml
|
2023-07-07 22:58:45 +08:00
|
|
|
api buildLibs.antlrst4
|
2022-05-10 18:15:36 +08:00
|
|
|
api buildLibs.asm
|
|
|
|
api buildLibs.asm.tree
|
|
|
|
api buildLibs.httpclient
|
|
|
|
api buildLibs.httpcore
|
2023-11-22 03:29:27 +08:00
|
|
|
|
2022-05-10 18:15:36 +08:00
|
|
|
compileOnly buildLibs.checkstyle
|
2023-12-05 16:30:50 +08:00
|
|
|
compileOnly buildLibs.reflections
|
|
|
|
|
2021-06-24 23:55:21 +08:00
|
|
|
runtimeOnly "org.elasticsearch.gradle:reaper:$version"
|
2022-05-10 18:15:36 +08:00
|
|
|
testImplementation buildLibs.checkstyle
|
|
|
|
testImplementation buildLibs.wiremock
|
|
|
|
testImplementation buildLibs.mockito.core
|
|
|
|
testImplementation buildLibs.hamcrest
|
2021-06-24 23:55:21 +08:00
|
|
|
testImplementation testFixtures("org.elasticsearch.gradle:build-tools:$version")
|
2021-06-01 17:19:30 +08:00
|
|
|
|
2022-05-10 18:15:36 +08:00
|
|
|
testImplementation(platform(buildLibs.junit5.platform))
|
|
|
|
testImplementation(buildLibs.junit5.jupiter) {
|
2021-10-14 23:18:10 +08:00
|
|
|
because 'allows to write and run Jupiter tests'
|
|
|
|
}
|
2022-05-10 18:15:36 +08:00
|
|
|
integTestImplementation(platform(buildLibs.junit5.platform))
|
|
|
|
integTestImplementation(buildLibs.junit5.jupiter) {
|
2021-04-17 01:16:42 +08:00
|
|
|
because 'allows to write and run Jupiter tests'
|
|
|
|
}
|
2022-05-10 18:15:36 +08:00
|
|
|
integTestImplementation(buildLibs.bytebuddy) {
|
2021-06-01 17:19:30 +08:00
|
|
|
because 'Generating dynamic mocks of internal libraries like JdkJarHell'
|
|
|
|
}
|
2022-05-10 18:15:36 +08:00
|
|
|
testRuntimeOnly(buildLibs.junit5.vintage) {
|
2021-04-17 01:16:42 +08:00
|
|
|
because 'allows JUnit 3 and JUnit 4 tests to run'
|
|
|
|
}
|
2022-05-10 18:15:36 +08:00
|
|
|
testRuntimeOnly(buildLibs.junit5.platform.launcher) {
|
2021-04-17 01:16:42 +08:00
|
|
|
because 'allows tests to run from IDEs that bundle older version of launcher'
|
|
|
|
}
|
|
|
|
|
2022-05-10 18:15:36 +08:00
|
|
|
testImplementation platform(buildLibs.spock.platform)
|
|
|
|
testImplementation(buildLibs.spock.core) {
|
2021-05-05 16:13:45 +08:00
|
|
|
exclude module: "groovy"
|
|
|
|
}
|
2022-05-10 18:15:36 +08:00
|
|
|
integTestImplementation platform(buildLibs.spock.platform)
|
|
|
|
integTestImplementation(buildLibs.spock.core) {
|
2020-06-24 15:40:18 +08:00
|
|
|
exclude module: "groovy"
|
2020-06-18 16:53:11 +08:00
|
|
|
}
|
2021-05-05 16:13:45 +08:00
|
|
|
// required as we rely on junit4 rules
|
2022-05-10 18:15:36 +08:00
|
|
|
integTestImplementation(buildLibs.spock.junit4) {
|
2021-12-07 02:58:56 +08:00
|
|
|
exclude module: "groovy"
|
|
|
|
}
|
2022-05-10 18:15:36 +08:00
|
|
|
testImplementation buildLibs.spock.junit4
|
2022-06-29 19:29:14 +08:00
|
|
|
testImplementation buildLibs.json.assert
|
2022-05-10 18:15:36 +08:00
|
|
|
integTestImplementation buildLibs.xmlunit.core
|
2022-09-29 02:13:03 +08:00
|
|
|
|
2017-01-19 16:56:54 +08:00
|
|
|
}
|
2016-05-07 13:22:38 +08:00
|
|
|
|
2021-10-14 23:18:10 +08:00
|
|
|
tasks.named('test').configure {
|
|
|
|
useJUnitPlatform()
|
|
|
|
}
|
2021-06-01 17:19:30 +08:00
|
|
|
tasks.register("integTest", Test) {
|
|
|
|
systemProperty 'test.version_under_test', version
|
|
|
|
testClassesDirs = sourceSets.integTest.output.classesDirs
|
|
|
|
classpath = sourceSets.integTest.runtimeClasspath
|
|
|
|
useJUnitPlatform()
|
2015-11-10 23:30:11 +08:00
|
|
|
}
|
2015-12-04 11:53:50 +08:00
|
|
|
|
2021-06-05 05:33:46 +08:00
|
|
|
tasks.named("check").configure { dependsOn("integTest") }
|
2021-12-15 16:27:16 +08:00
|
|
|
|
|
|
|
tasks.register("bootstrapPerformanceTests", Copy) {
|
|
|
|
from('performance')
|
|
|
|
into('build/performanceTests')
|
|
|
|
def root = file('..')
|
2022-07-19 14:12:19 +08:00
|
|
|
inputs.property('branchWrapper', gradle.gradleVersion)
|
2022-03-23 16:29:16 +08:00
|
|
|
filter(ReplaceTokens, tokens: [
|
|
|
|
testGitCommit:GitInfo.gitInfo(root).revision,
|
2022-07-27 00:51:42 +08:00
|
|
|
mainWrapper:"${ -> resolveMainWrapperVersion()}".toString(),
|
2022-07-19 14:12:19 +08:00
|
|
|
branchWrapper:"${-> gradle.gradleVersion}".toString()])
|
2022-03-23 16:29:16 +08:00
|
|
|
}
|
|
|
|
|
2023-01-12 04:51:48 +08:00
|
|
|
tasks.named("jar") {
|
|
|
|
exclude("classpath.index")
|
|
|
|
}
|
|
|
|
|
2022-07-27 00:51:42 +08:00
|
|
|
def resolveMainWrapperVersion() {
|
|
|
|
new URL("https://raw.githubusercontent.com/elastic/elasticsearch/main/build-tools-internal/src/main/resources/minimumGradleVersion").text.trim()
|
2022-01-24 22:28:51 +08:00
|
|
|
}
|
2022-01-27 16:57:47 +08:00
|
|
|
|
|
|
|
abstract class JacksonAlignmentRule implements ComponentMetadataRule {
|
|
|
|
void execute(ComponentMetadataContext ctx) {
|
|
|
|
ctx.details.with {d ->
|
|
|
|
if (d.id.group.startsWith("com.fasterxml.jackson")) {
|
|
|
|
// declare that Jackson modules all belong to the Jackson virtual platform
|
|
|
|
belongsTo("com.fasterxml.jackson:jackson-bom:${d.id.version}")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-03-15 02:27:24 +08:00
|
|
|
}
|