Build: Change location in zip of license and notice inclusion for plugins (#23316)

This commit moves the LICENSE.txt and NOTICE.txt files for each plugin
to be alongside the other plugin files, inside the elasticsearch subdir.
This ensures those files are installed alongside the plugin.
This commit is contained in:
Ryan Ernst 2017-02-22 16:13:50 -08:00 committed by GitHub
parent 18f57c05cf
commit 74ecd34fd7
1 changed files with 3 additions and 7 deletions

View File

@ -253,19 +253,15 @@ public class PluginBuildPlugin extends BuildPlugin {
protected void addNoticeGeneration(Project project) { protected void addNoticeGeneration(Project project) {
File licenseFile = project.pluginProperties.extension.licenseFile File licenseFile = project.pluginProperties.extension.licenseFile
if (licenseFile != null) { if (licenseFile != null) {
project.bundlePlugin.into('/') { project.bundlePlugin.from(licenseFile.parentFile) {
from(licenseFile.parentFile) { include(licenseFile.name)
include(licenseFile.name)
}
} }
} }
File noticeFile = project.pluginProperties.extension.licenseFile File noticeFile = project.pluginProperties.extension.licenseFile
if (noticeFile != null) { if (noticeFile != null) {
NoticeTask generateNotice = project.tasks.create('generateNotice', NoticeTask.class) NoticeTask generateNotice = project.tasks.create('generateNotice', NoticeTask.class)
generateNotice.dependencies(project) generateNotice.dependencies(project)
project.bundlePlugin.into('/') { project.bundlePlugin.from(generateNotice)
from(generateNotice)
}
} }
} }
} }