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@2642c20381
This commit is contained in:
Ryan Ernst 2016-07-25 17:09:54 -07:00
parent fc5d20a312
commit b9a3fa3079
4 changed files with 11 additions and 12 deletions

View File

@ -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'
}
}

View File

@ -3,7 +3,5 @@ subprojects {
project.forbiddenPatterns {
exclude '**/*.key'
}
// someone figure out what the x-plugins logic should be
project.licenseHeaders.enabled = false
}
}

View File

@ -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
}
}

View File

@ -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 <djm@mindrot.org>'
}
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