18
18
*/
19
19
package org.elasticsearch.gradle.plugin
20
20
21
+ import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin
21
22
import nebula.plugin.info.scm.ScmInfoPlugin
22
23
import org.elasticsearch.gradle.BuildPlugin
23
24
import org.elasticsearch.gradle.NoticeTask
24
25
import org.elasticsearch.gradle.test.RestIntegTestTask
25
26
import org.elasticsearch.gradle.test.RunTask
27
+ import org.gradle.api.InvalidUserDataException
26
28
import org.gradle.api.JavaVersion
27
29
import org.gradle.api.Project
28
30
import org.gradle.api.Task
@@ -46,6 +48,18 @@ public class PluginBuildPlugin extends BuildPlugin {
46
48
@Override
47
49
public void apply (Project project ) {
48
50
super . apply(project)
51
+ project. plugins. withType(ShadowPlugin ). whenPluginAdded {
52
+ /*
53
+ * We've not tested these plugins together and we're fairly sure
54
+ * they aren't going to work properly as is *and* we're not really
55
+ * sure *why* you'd want to shade stuff in plugins. So we throw an
56
+ * exception here to make you come and read this comment. If you
57
+ * have a need for shadow while building plugins then know that you
58
+ * are probably going to have to fight with gradle for a while....
59
+ */
60
+ throw new InvalidUserDataException (' elasticsearch.esplugin is not '
61
+ + ' compatible with com.github.johnrengelman.shadow' );
62
+ }
49
63
configureDependencies(project)
50
64
// this afterEvaluate must happen before the afterEvaluate added by integTest creation,
51
65
// so that the file name resolution for installing the plugin will be setup
0 commit comments