Build: Fix meta modules to not install as plugin in tests (#29150)

This commit fixes the meta plugin build to conditionally install the
plugin as a module or plugin, depending on whether it is a
module or plugin.
This commit is contained in:
Ryan Ernst 2018-03-19 16:10:16 -07:00 committed by GitHub
parent 687577a516
commit 1eb1d59de8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 2 deletions

View File

@ -37,19 +37,28 @@ class MetaPluginBuildPlugin implements Plugin<Project> {
project.plugins.apply(RestTestPlugin)
createBundleTask(project)
boolean isModule = project.path.startsWith(':modules:')
project.integTestCluster {
dependsOn(project.bundlePlugin)
plugin(project.path)
}
BuildPlugin.configurePomGeneration(project)
project.afterEvaluate {
PluginBuildPlugin.addZipPomGeneration(project)
if (isModule) {
if (project.integTestCluster.distribution == 'integ-test-zip') {
project.integTestCluster.module(project)
}
} else {
project.integTestCluster.plugin(project.path)
}
}
RunTask run = project.tasks.create('run', RunTask)
run.dependsOn(project.bundlePlugin)
run.clusterConfig.plugin(project.path)
if (isModule == false) {
run.clusterConfig.plugin(project.path)
}
}
private static void createBundleTask(Project project) {