mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 09:28:55 -04:00
Update build tools internal dependencies (#82875)
- use latest versions of gradle plugins - do not rely on idea annotations - remove nebula.optional-deps plugin where not used - Fix some version conflicts
This commit is contained in:
parent
036eb8055d
commit
717cb68dd6
10 changed files with 25 additions and 24 deletions
|
@ -202,27 +202,36 @@ configurations {
|
|||
integTestRuntimeOnly.extendsFrom(testRuntimeOnly)
|
||||
}
|
||||
dependencies {
|
||||
constraints {
|
||||
api("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:${versions.getProperty('jackson')}") {
|
||||
version {
|
||||
strictly "${versions.getProperty('jackson')}"
|
||||
}
|
||||
because 'We want to use the exact same jackson version we use in production'
|
||||
}
|
||||
}
|
||||
api localGroovy()
|
||||
api gradleApi()
|
||||
|
||||
api "org.elasticsearch:build-conventions:$version"
|
||||
api "org.elasticsearch.gradle:build-tools:$version"
|
||||
|
||||
api 'commons-codec:commons-codec:1.12'
|
||||
// same version as http client transitive dep
|
||||
api 'commons-codec:commons-codec:1.11'
|
||||
api 'org.apache.commons:commons-compress:1.19'
|
||||
api 'org.apache.ant:ant:1.10.8'
|
||||
api 'com.netflix.nebula:gradle-extra-configurations-plugin:5.0.1'
|
||||
api 'com.netflix.nebula:gradle-info-plugin:9.2.0'
|
||||
api 'com.netflix.nebula:gradle-extra-configurations-plugin:7.0.0'
|
||||
api 'com.netflix.nebula:gradle-info-plugin:11.1.0'
|
||||
api 'org.apache.rat:apache-rat:0.11'
|
||||
api "net.java.dev.jna:jna:${versions.getProperty('jna')}"
|
||||
api 'gradle.plugin.com.github.jengelman.gradle.plugins:shadow:7.0.0'
|
||||
api 'gradle.plugin.com.github.johnrengelman:shadow:7.1.2'
|
||||
// for our ide tweaking
|
||||
api 'gradle.plugin.org.jetbrains.gradle.plugin.idea-ext:gradle-idea-ext:0.7'
|
||||
api 'gradle.plugin.org.jetbrains.gradle.plugin.idea-ext:gradle-idea-ext:1.1.1'
|
||||
// When upgrading forbidden apis, ensure dependency version is bumped in ThirdPartyPrecommitPlugin as well
|
||||
api 'de.thetaphi:forbiddenapis:3.2'
|
||||
api 'com.avast.gradle:gradle-docker-compose-plugin:0.14.0'
|
||||
api 'com.avast.gradle:gradle-docker-compose-plugin:0.14.13'
|
||||
api 'org.apache.maven:maven-model:3.6.2'
|
||||
api 'com.networknt:json-schema-validator:1.0.36'
|
||||
api 'com.networknt:json-schema-validator:1.0.65'
|
||||
api "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:${versions.getProperty('jackson')}"
|
||||
api 'org.ow2.asm:asm:9.2'
|
||||
api 'org.ow2.asm:asm-tree:9.2'
|
||||
|
@ -231,7 +240,6 @@ dependencies {
|
|||
compileOnly "com.puppycrawl.tools:checkstyle:${versions.getProperty('checkstyle')}"
|
||||
runtimeOnly "org.elasticsearch.gradle:reaper:$version"
|
||||
testImplementation "com.puppycrawl.tools:checkstyle:${versions.getProperty('checkstyle')}"
|
||||
// testImplementation "junit:junit:${versions.getProperty('junit')}"
|
||||
testImplementation 'com.github.tomakehurst:wiremock-jre8-standalone:2.23.2'
|
||||
testImplementation 'org.mockito:mockito-core:1.9.5'
|
||||
testImplementation "org.hamcrest:hamcrest:${versions.getProperty('hamcrest')}"
|
||||
|
|
|
@ -10,7 +10,6 @@ package org.elasticsearch.gradle.internal;
|
|||
import org.elasticsearch.gradle.Architecture;
|
||||
import org.elasticsearch.gradle.Version;
|
||||
import org.elasticsearch.gradle.VersionProperties;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
@ -284,7 +283,7 @@ public class BwcVersions {
|
|||
public record VersionPair(Version elasticsearch, Version lucene) implements Comparable<VersionPair> {
|
||||
|
||||
@Override
|
||||
public int compareTo(@NotNull VersionPair o) {
|
||||
public int compareTo(VersionPair o) {
|
||||
// For ordering purposes, sort by Elasticsearch version
|
||||
return this.elasticsearch.compareTo(o.elasticsearch);
|
||||
}
|
||||
|
|
|
@ -187,7 +187,7 @@ public class ElasticsearchTestBasePlugin implements Plugin<Project> {
|
|||
SourceSetContainer sourceSets = project.getExtensions().getByType(SourceSetContainer.class);
|
||||
FileCollection mainRuntime = sourceSets.getByName(SourceSet.MAIN_SOURCE_SET_NAME).getRuntimeClasspath();
|
||||
// Add any "shadow" dependencies. These are dependencies that are *not* bundled into the shadow JAR
|
||||
Configuration shadowConfig = project.getConfigurations().getByName(ShadowBasePlugin.getCONFIGURATION_NAME());
|
||||
Configuration shadowConfig = project.getConfigurations().getByName(ShadowBasePlugin.CONFIGURATION_NAME);
|
||||
// Add the shadow JAR artifact itself
|
||||
FileCollection shadowJar = project.files(project.getTasks().named("shadowJar"));
|
||||
FileCollection testRuntime = sourceSets.getByName(SourceSet.TEST_SOURCE_SET_NAME).getRuntimeClasspath();
|
||||
|
|
|
@ -21,7 +21,6 @@ import org.gradle.api.Plugin;
|
|||
import org.gradle.api.Project;
|
||||
import org.gradle.api.plugins.JavaBasePlugin;
|
||||
import org.gradle.api.provider.ProviderFactory;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
|
@ -78,7 +77,6 @@ public class RestTestBasePlugin implements Plugin<Project> {
|
|||
.configureEach(t -> t.finalizedBy(project.getTasks().withType(FixtureStop.class)));
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private String systemProperty(String propName) {
|
||||
return providerFactory.systemProperty(propName).forUseAtConfigurationTime().getOrNull();
|
||||
}
|
||||
|
|
|
@ -18,7 +18,6 @@ import org.elasticsearch.gradle.internal.test.rest.transform.RestTestTransform;
|
|||
import org.elasticsearch.gradle.internal.test.rest.transform.RestTestTransformByParentObject;
|
||||
import org.elasticsearch.gradle.internal.test.rest.transform.RestTestTransformGlobalSetup;
|
||||
import org.gradle.api.tasks.Input;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
|
@ -43,7 +42,7 @@ public class Skip implements RestTestTransformGlobalSetup, RestTestTransformByPa
|
|||
}
|
||||
|
||||
@Override
|
||||
public ObjectNode transformSetup(@Nullable ObjectNode setupNodeParent) {
|
||||
public ObjectNode transformSetup(ObjectNode setupNodeParent) {
|
||||
// only transform the global setup if there is no named test
|
||||
if (testName.isBlank()) {
|
||||
ArrayNode setupNode;
|
||||
|
|
|
@ -108,11 +108,10 @@ public class TestFixturesPlugin implements Plugin<Project> {
|
|||
maybeSkipTask(dockerSupport, buildFixture);
|
||||
|
||||
ComposeExtension composeExtension = project.getExtensions().getByType(ComposeExtension.class);
|
||||
composeExtension.setUseComposeFiles(Collections.singletonList(DOCKER_COMPOSE_YML));
|
||||
composeExtension.setRemoveContainers(true);
|
||||
composeExtension.setExecutable(
|
||||
project.file("/usr/local/bin/docker-compose").exists() ? "/usr/local/bin/docker-compose" : "/usr/bin/docker-compose"
|
||||
);
|
||||
composeExtension.getUseComposeFiles().addAll(Collections.singletonList(DOCKER_COMPOSE_YML));
|
||||
composeExtension.getRemoveContainers().set(true);
|
||||
composeExtension.getExecutable()
|
||||
.set(project.file("/usr/local/bin/docker-compose").exists() ? "/usr/local/bin/docker-compose" : "/usr/bin/docker-compose");
|
||||
|
||||
tasks.named("composeUp").configure(t -> {
|
||||
// Avoid running docker-compose tasks in parallel in CI due to some issues on certain Linux distributions
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
apply plugin: 'elasticsearch.build'
|
||||
apply plugin: 'nebula.optional-base'
|
||||
apply plugin: 'elasticsearch.publish'
|
||||
|
||||
dependencies {
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
apply plugin: 'nebula.optional-base'
|
||||
apply plugin: 'elasticsearch.publish'
|
||||
|
||||
dependencies {
|
||||
|
|
|
@ -12,7 +12,7 @@ apply plugin: 'elasticsearch.rest-test'
|
|||
apply plugin: 'elasticsearch.test-with-dependencies'
|
||||
|
||||
dependencies {
|
||||
testImplementation "com.fasterxml.jackson.core:jackson-databind:2.10.4"
|
||||
testImplementation "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
|
||||
testImplementation project(':plugins:transport-nio') // for http
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ dependencies {
|
|||
testImplementation project(path: xpackModule('searchable-snapshots'))
|
||||
testImplementation project(path: xpackModule('ilm'))
|
||||
|
||||
testImplementation "com.fasterxml.jackson.core:jackson-databind:2.10.4"
|
||||
testImplementation "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
|
||||
testImplementation project(':plugins:transport-nio') // for http
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue