Build: Omit dependency licenses check for elasticsearch deps ()

Sometimes modules/plugins depend on locally built elasticsearch jars.
This means not only that the jar is constantly changing (so no need for
a sha check), but also that the license falls under the Elasticsearch
license, and there is no need to keep another copy. This commit updates
the dependencies checked by dependencyLicenses to exclude those that are
built by elasticsearch.
This commit is contained in:
Ryan Ernst 2018-01-18 14:15:44 -08:00 committed by GitHub
parent 9db9bd52f7
commit 19a2b01e43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 8 deletions
buildSrc/src/main/groovy/org/elasticsearch/gradle
modules/reindex

@ -659,7 +659,10 @@ class BuildPlugin implements Plugin<Project> {
Task precommit = PrecommitTasks.create(project, true)
project.check.dependsOn(precommit)
project.test.mustRunAfter(precommit)
project.dependencyLicenses.dependencies = project.configurations.runtime - project.configurations.provided
// only require dependency licenses for non-elasticsearch deps
project.dependencyLicenses.dependencies = project.configurations.runtime.fileCollection {
it.group.startsWith('org.elasticsearch') == false
} - project.configurations.provided
}
private static configureDependenciesInfo(Project project) {

@ -52,13 +52,6 @@ dependencies {
testCompile project(path: ':modules:parent-join', configuration: 'runtime')
}
dependencyLicenses {
// Don't check the client's license. We know it.
dependencies = project.configurations.runtime.fileCollection {
it.group.startsWith('org.elasticsearch') == false
} - project.configurations.provided
}
thirdPartyAudit.excludes = [
// Commons logging
'javax.servlet.ServletContextEvent',