Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions build-tools-internal/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,6 @@ dependencies {
api "org.elasticsearch:build-conventions:$version"
api "org.elasticsearch.gradle:build-tools:$version"

// same version as http client transitive dep
api buildLibs.commons.codec
api buildLibs.apache.compress
api buildLibs.nebula.info
api buildLibs.apache.rat
Expand All @@ -303,8 +301,8 @@ dependencies {
api buildLibs.antlrst4
api buildLibs.asm
api buildLibs.asm.tree
api buildLibs.httpclient
api buildLibs.httpcore
api buildLibs.httpclient5
api buildLibs.httpcore5

compileOnly buildLibs.checkstyle
compileOnly buildLibs.reflections
Expand Down
2 changes: 1 addition & 1 deletion build-tools-internal/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pluginManagement {
}

includeBuild "../build-conventions"
includeBuild "../build-tools"
includeBuild "../build-tools"
}

plugins {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@

package org.elasticsearch.gradle.internal.snyk;

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPut;
import org.apache.http.entity.FileEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import org.apache.hc.client5.http.classic.methods.HttpPut;
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse;
import org.apache.hc.client5.http.impl.classic.HttpClients;
import org.apache.hc.core5.http.ContentType;
import org.apache.hc.core5.http.ParseException;
import org.apache.hc.core5.http.io.entity.EntityUtils;
import org.apache.hc.core5.http.io.entity.FileEntity;
import org.gradle.api.DefaultTask;
import org.gradle.api.GradleException;
import org.gradle.api.file.RegularFileProperty;
Expand Down Expand Up @@ -61,16 +63,16 @@ void upload() {
HttpPut putRequest = new HttpPut(endpoint);
putRequest.addHeader("Authorization", "token " + token.get());
putRequest.addHeader("Content-Type", "application/json");
putRequest.setEntity(new FileEntity(inputFile.getAsFile().get()));
putRequest.setEntity(new FileEntity(inputFile.getAsFile().get(), ContentType.APPLICATION_JSON));
response = client.execute(putRequest);
int statusCode = response.getStatusLine().getStatusCode();
int statusCode = response.getCode();
String responseString = EntityUtils.toString(response.getEntity());
getLogger().info("Snyk API call response status: " + statusCode);
if (statusCode != HttpURLConnection.HTTP_CREATED) {
throw new GradleException("Uploading Snyk Graph failed with http code " + statusCode + ": " + responseString);
}
getLogger().info(responseString);
} catch (IOException e) {
} catch (IOException | ParseException e) {
throw new GradleException("Failed to call API endpoint to submit updated dependency graph", e);
}
}
Expand Down
2 changes: 1 addition & 1 deletion distribution/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ configure(subprojects.findAll { ['archives', 'packages'].contains(it.name) }) {
}
all {
resolutionStrategy.dependencySubstitution {
substitute module("org.apache.logging.log4j:log4j-core") using project(":libs:log4j") because "patched to remove JndiLookup clas"}
substitute module("org.apache.logging.log4j:log4j-core") using project(":libs:log4j") because "patched to remove JndiLookup class"}
}
}

Expand Down
5 changes: 2 additions & 3 deletions gradle/build.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ asm = { group = "org.ow2.asm", name="asm", version.ref="asm" }
asm-tree = { group = "org.ow2.asm", name="asm-tree", version.ref="asm" }
bytebuddy = "net.bytebuddy:byte-buddy:1.15.11"
checkstyle = "com.puppycrawl.tools:checkstyle:10.3"
commons-codec = "commons-codec:commons-codec:1.11"
commmons-io = "commons-io:commons-io:2.2"
docker-compose = "com.avast.gradle:gradle-docker-compose-plugin:0.17.5"
forbiddenApis = "de.thetaphi:forbiddenapis:3.8"
gradle-enterprise = "com.gradle:develocity-gradle-plugin:3.18.1"
hamcrest = "org.hamcrest:hamcrest:2.1"
httpcore = "org.apache.httpcomponents:httpcore:4.4.16"
httpclient = "org.apache.httpcomponents:httpclient:4.5.14"
httpcore5 = "org.apache.httpcomponents.core5:httpcore5:5.3.3"
httpclient5 = "org.apache.httpcomponents.client5:httpclient5:5.4.2"
idea-ext = "gradle.plugin.org.jetbrains.gradle.plugin.idea-ext:gradle-idea-ext:1.1.4"
javaparser = "com.github.javaparser:javaparser-core:3.18.0"
json-schema-validator = "com.networknt:json-schema-validator:1.0.72"
Expand Down
20 changes: 15 additions & 5 deletions gradle/verification-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1991,11 +1991,6 @@
<sha256 value="1df8b9430b5c8ed143d7815e403e33ef5371b2400aadbe9bda0883762e0846d1" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.apache.commons" name="commons-compress" version="1.19">
<artifact name="commons-compress-1.19.jar">
<sha256 value="ff2d59fad74e867630fbc7daab14c432654712ac624dbee468d220677b124dd5" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.apache.commons" name="commons-compress" version="1.21">
<artifact name="commons-compress-1.21.jar">
<sha256 value="6aecfd5459728a595601cfa07258d131972ffc39b492eb48bdd596577a2f244a" origin="Generated by Gradle"/>
Expand Down Expand Up @@ -2639,6 +2634,21 @@
<sha256 value="4018736ede2d321034e8517ea90baefb31831a8608afccc446d8a699fb1d00d4" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.apache.httpcomponents.client5" name="httpclient5" version="5.4.2">
<artifact name="httpclient5-5.4.2.jar">
<sha256 value="a0a9dcd3696a6281f82e392d39aa674bf9662496605411de2a00d44435a7fb26" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.apache.httpcomponents.core5" name="httpcore5" version="5.3.3">
<artifact name="httpcore5-5.3.3.jar">
<sha256 value="087b7ae9bde9d3518b4b5d06f3560d7fd0db04098655e76b64e791773847d503" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.apache.httpcomponents.core5" name="httpcore5-h2" version="5.3.3">
<artifact name="httpcore5-h2-5.3.3.jar">
<sha256 value="a121f4b14ec525e54e29b9f5db7b93f4a97e088774e81c7143b5198f67d81bec" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.apache.james" name="apache-mime4j-core" version="0.8.11">
<artifact name="apache-mime4j-core-0.8.11.jar">
<sha256 value="62a7853523dff0c382065df82fa280c1bf59bcd9b329180d707b0f6f15ceb903" origin="Generated by Gradle"/>
Expand Down