diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/plugin/MetaPluginBuildPlugin.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/plugin/MetaPluginBuildPlugin.groovy index 4dc355a48608a..3c3a904b89aed 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/plugin/MetaPluginBuildPlugin.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/plugin/MetaPluginBuildPlugin.groovy @@ -79,12 +79,13 @@ class MetaPluginBuildPlugin implements Plugin { buildProperties.extension.plugins.each { String bundledPluginProjectName -> Project bundledPluginProject = project.project(bundledPluginProjectName) bundledPluginProject.afterEvaluate { + String bundledPluginName = bundledPluginProject.esplugin.name bundle.configure { dependsOn bundledPluginProject.bundlePlugin from(project.zipTree(bundledPluginProject.bundlePlugin.outputs.files.singleFile)) { eachFile { FileCopyDetails details -> // we want each path to have the plugin name interjected - details.relativePath = new RelativePath(true, bundledPluginProjectName, details.relativePath.toString()) + details.relativePath = new RelativePath(true, bundledPluginName, details.relativePath.toString()) } } }