OpenSearch/x-pack/build.gradle
Mark Vieira 9b0f5a1589
Include vendored code notices in distribution notice files (#57017) (#57569)
(cherry picked from commit 627ef279fd29f8af63303bcaafd641aef0ffc586)
2020-06-04 10:34:24 -07:00

45 lines
1.6 KiB
Groovy

import org.elasticsearch.gradle.plugin.PluginBuildPlugin
import org.elasticsearch.gradle.precommit.LicenseHeadersTask
Project xpackRootProject = project
subprojects {
// We define a specific repository for opensaml since the shibboleth project doesn't publish to maven central and the
// artifacts that are located there are not curated/updated by the project
// see: https://wiki.shibboleth.net/confluence/display/DEV/Use+of+Maven+Central
repositories {
maven {
name "opensaml"
url "https://artifactory.elstc.co/artifactory/shibboleth-releases/"
content {
includeGroup "org.opensaml"
includeGroup "net.shibboleth.utilities"
includeGroup "net.shibboleth"
}
}
}
group = 'org.elasticsearch.plugin'
ext.xpackRootProject = xpackRootProject
ext.xpackProject = { String projectName -> xpackRootProject.project(projectName) }
// helper method to find the path to a module
ext.xpackModule = { String moduleName -> xpackProject("plugin:${moduleName}").path }
plugins.withType(PluginBuildPlugin).whenPluginAdded {
project.esplugin.licenseFile = rootProject.file('licenses/ELASTIC-LICENSE.txt')
project.esplugin.noticeFile = xpackRootProject.file('NOTICE.txt')
}
tasks.withType(LicenseHeadersTask.class) {
approvedLicenses = ['Elastic License', 'Generated', 'Vendored']
additionalLicense 'ELAST', 'Elastic License', 'Licensed under the Elastic License'
}
ext.licenseName = 'Elastic License'
ext.licenseUrl = ext.elasticLicenseUrl
project.ext.licenseFile = rootProject.file('licenses/ELASTIC-LICENSE.txt')
project.ext.noticeFile = xpackRootProject.file('NOTICE.txt')
}