mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-23 06:37:27 -04:00
- Use file property and conventions to avoid afterEvaluate hook - Simplify root build script - One little step closer to configuration cache compliance
47 lines
1.9 KiB
Groovy
47 lines
1.9 KiB
Groovy
import org.elasticsearch.gradle.plugin.PluginBuildPlugin
|
|
import org.elasticsearch.gradle.internal.conventions.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-2.0.txt')
|
|
project.esplugin.noticeFile = xpackRootProject.file('NOTICE.txt')
|
|
}
|
|
|
|
tasks.withType(LicenseHeadersTask.class).configureEach {
|
|
approvedLicenses = ['Elastic License 2.0', 'Generated', 'Vendored']
|
|
additionalLicense 'ELAST', 'Elastic License 2.0', '2.0; you may not use this file except in compliance with the Elastic License'
|
|
}
|
|
|
|
project.pluginManager.withPlugin("elasticsearch.licensing") {
|
|
ext.projectLicenses.set(['Elastic License 2.0': ext.elasticLicenseUrl.get()])
|
|
}
|
|
|
|
project.pluginManager.withPlugin("elasticsearch.build") {
|
|
project.ext.licenseFile.set(rootProject.file('licenses/ELASTIC-LICENSE-2.0.txt'))
|
|
project.ext.noticeFile.set(xpackRootProject.file('NOTICE.txt'))
|
|
}
|
|
}
|