From b9a3fa3079af576e617c1889a357924dd211bb9e Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Mon, 25 Jul 2016 17:09:54 -0700 Subject: [PATCH] Build: Turn on license header checks This is dependent on elastic/elasticsearchelastic/elasticsearch#19589. It also fixes the existing files that either were missing the license header or had the open source license header. Original commit: elastic/x-pack-elasticsearch@2642c20381ddfecd6d602ad8426f197ba4e4f002 --- elasticsearch/build.gradle | 7 +++++++ elasticsearch/license/build.gradle | 2 -- elasticsearch/qa/build.gradle | 6 ------ elasticsearch/x-pack/build.gradle | 8 ++++---- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/elasticsearch/build.gradle b/elasticsearch/build.gradle index c0d83f4e83e..b83ecb35ba4 100644 --- a/elasticsearch/build.gradle +++ b/elasticsearch/build.gradle @@ -1,3 +1,5 @@ +import org.elasticsearch.gradle.precommit.LicenseHeadersTask + File checkstyleSuppressions = file('checkstyle_suppressions.xml') subprojects { tasks.withType(Checkstyle) { @@ -7,4 +9,9 @@ subprojects { suppressions: checkstyleSuppressions ] } + + tasks.withType(LicenseHeadersTask.class) { + approvedLicenses = ['Elasticsearch Confidential'] + additionalLicense 'ESCON', 'Elasticsearch Confidential', 'ELASTICSEARCH CONFIDENTIAL' + } } diff --git a/elasticsearch/license/build.gradle b/elasticsearch/license/build.gradle index f4f03e52e7a..b4e221e7884 100644 --- a/elasticsearch/license/build.gradle +++ b/elasticsearch/license/build.gradle @@ -3,7 +3,5 @@ subprojects { project.forbiddenPatterns { exclude '**/*.key' } - // someone figure out what the x-plugins logic should be - project.licenseHeaders.enabled = false } } diff --git a/elasticsearch/qa/build.gradle b/elasticsearch/qa/build.gradle index 3c9541e6178..e69de29bb2d 100644 --- a/elasticsearch/qa/build.gradle +++ b/elasticsearch/qa/build.gradle @@ -1,6 +0,0 @@ -subprojects { - tasks.withType(org.elasticsearch.gradle.precommit.LicenseHeadersTask) { - // someone figure out what the x-plugins logic should be - project.licenseHeaders.enabled = false - } -} diff --git a/elasticsearch/x-pack/build.gradle b/elasticsearch/x-pack/build.gradle index 9fd6a295b0d..a83e22824c7 100644 --- a/elasticsearch/x-pack/build.gradle +++ b/elasticsearch/x-pack/build.gradle @@ -19,7 +19,10 @@ ext.versions = [ // TODO: fix this! https://github.com/elastic/x-plugins/issues/1066 ext.compactProfile = 'full' -dependencyLicenses.enabled = false +licenseHeaders { + approvedLicenses << 'BCrypt (BSD-like)' + additionalLicense 'BCRYP', 'BCrypt (BSD-like)', 'Copyright (c) 2006 Damien Miller ' +} dependencies { // license deps @@ -232,9 +235,6 @@ thirdPartyAudit.excludes = [ 'javax.activation.UnsupportedDataTypeException' ] -// someone figure out what the x-plugins logic should be -licenseHeaders.enabled = false - modifyPom { MavenPom pom -> pom.withXml { XmlProvider xml -> // first find if we have dependencies at all, and grab the node