Skip to content

Commit 6912e43

Browse files
committed
Merge branch '6.x' into ccr-6.x
* 6.x: [Rollup] Better error message when trying to set non-rollup index (#32965) Remove unused User class from protocol (#33137) [DOCS] Adds link to 6.3.0 release highlights Test: fix token bwc tests due to bad backport Ensure to generate identical NoOp for the same failure (#33141) [Docs] Add link to es-kotlin-wrapper-client (#32618) [Docs] Remove repeating words (#33087) Minor spelling and grammar fix (#32931) Run Third party audit with forbidden APIs CLI (part3/3) (#33052) Fix plugin build test on Windows (#33078) Watcher: Simplify finding next date in cron schedule (#33015) Remove old unused test script files (#32970) Build analysis-icu client JAR (#33184) Switch remaining tests to new style Requests (#33109) Use internal connection manager when fetching remote node info Switch remaining x-pack tests to new style Requests (#33108) Switch remaining ml tests to new style Requests (#33107) Token API supports the client_credentials grant (#33106)
2 parents 6181081 + 9e072f7 commit 6912e43

File tree

182 files changed

+2029
-1675
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

182 files changed

+2029
-1675
lines changed

buildSrc/build.gradle

-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ dependencies {
102102
compile 'com.netflix.nebula:gradle-info-plugin:3.0.3'
103103
compile 'org.eclipse.jgit:org.eclipse.jgit:3.2.0.201312181205-r'
104104
compile 'com.perforce:p4java:2012.3.551082' // THIS IS SUPPOSED TO BE OPTIONAL IN THE FUTURE....
105-
compile 'de.thetaphi:forbiddenapis:2.5'
106105
compile 'org.apache.rat:apache-rat:0.11'
107106
compile "org.elasticsearch:jna:4.5.1"
108107
compile 'com.github.jengelman.gradle.plugins:shadow:2.0.4'

buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/PrecommitTasks.groovy

+19-20
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ class PrecommitTasks {
3131

3232
/** Adds a precommit task, which depends on non-test verification tasks. */
3333
public static Task create(Project project, boolean includeDependencyLicenses) {
34+
Configuration forbiddenApisConfiguration = project.configurations.create("forbiddenApisCliJar")
35+
project.dependencies {
36+
forbiddenApisCliJar ('de.thetaphi:forbiddenapis:2.5')
37+
}
38+
3439
List<Task> precommitTasks = [
3540
configureCheckstyle(project),
3641
configureForbiddenApisCli(project),
@@ -39,7 +44,7 @@ class PrecommitTasks {
3944
project.tasks.create('licenseHeaders', LicenseHeadersTask.class),
4045
project.tasks.create('filepermissions', FilePermissionsTask.class),
4146
project.tasks.create('jarHell', JarHellTask.class),
42-
project.tasks.create('thirdPartyAudit', ThirdPartyAuditTask.class)
47+
configureThirdPartyAudit(project)
4348
]
4449

4550
// tasks with just tests don't need dependency licenses, so this flag makes adding
@@ -75,32 +80,26 @@ class PrecommitTasks {
7580
return project.tasks.create(precommitOptions)
7681
}
7782

78-
private static Task configureForbiddenApisCli(Project project) {
79-
Configuration forbiddenApisConfiguration = project.configurations.create("forbiddenApisCliJar")
80-
project.dependencies {
81-
forbiddenApisCliJar ('de.thetaphi:forbiddenapis:2.5')
83+
private static Task configureThirdPartyAudit(Project project) {
84+
ThirdPartyAuditTask thirdPartyAuditTask = project.tasks.create('thirdPartyAudit', ThirdPartyAuditTask.class)
85+
ExportElasticsearchBuildResourcesTask buildResources = project.tasks.getByName('buildResources')
86+
thirdPartyAuditTask.configure {
87+
dependsOn(buildResources)
88+
signatureFile = buildResources.copy("forbidden/third-party-audit.txt")
89+
javaHome = project.runtimeJavaHome
8290
}
83-
Task forbiddenApisCli = project.tasks.create('forbiddenApis')
91+
return thirdPartyAuditTask
92+
}
8493

94+
private static Task configureForbiddenApisCli(Project project) {
95+
Task forbiddenApisCli = project.tasks.create('forbiddenApis')
8596
project.sourceSets.forEach { sourceSet ->
8697
forbiddenApisCli.dependsOn(
8798
project.tasks.create(sourceSet.getTaskName('forbiddenApis', null), ForbiddenApisCliTask) {
8899
ExportElasticsearchBuildResourcesTask buildResources = project.tasks.getByName('buildResources')
89100
dependsOn(buildResources)
90-
execAction = { spec ->
91-
spec.classpath = project.files(
92-
project.configurations.forbiddenApisCliJar,
93-
sourceSet.compileClasspath,
94-
sourceSet.runtimeClasspath
95-
)
96-
spec.executable = "${project.runtimeJavaHome}/bin/java"
97-
}
98-
inputs.files(
99-
forbiddenApisConfiguration,
100-
sourceSet.compileClasspath,
101-
sourceSet.runtimeClasspath
102-
)
103-
101+
it.sourceSet = sourceSet
102+
javaHome = project.runtimeJavaHome
104103
targetCompatibility = project.compilerJavaVersion
105104
bundledSignatures = [
106105
"jdk-unsafe", "jdk-deprecated", "jdk-non-portable", "jdk-system-out"

buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/ThirdPartyAuditTask.groovy

-297
This file was deleted.

buildSrc/src/main/groovy/org/elasticsearch/gradle/test/StandaloneRestTestPlugin.groovy

+2
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ public class StandaloneRestTestPlugin implements Plugin<Project> {
5353

5454
// only setup tests to build
5555
project.sourceSets.create('test')
56+
// create a compileOnly configuration as others might expect it
57+
project.configurations.create("compileOnly")
5658
project.dependencies.add('testCompile', "org.elasticsearch.test:framework:${VersionProperties.elasticsearch}")
5759

5860
project.eclipse.classpath.sourceSets = [project.sourceSets.test]

0 commit comments

Comments
 (0)