vaadin / vaadin-gradle-plugin

Gradle plugin for Vaadin 14 applications. Takes care of front-end build, helps to configure repositories and to create various project and file templates.
Apache License 2.0
31 stars 9 forks source link

Conflict with Vaadin 8 plugin #26

Closed mvysny closed 4 years ago

mvysny commented 4 years ago

When both com.devsoap.plugin.vaadin and com.vaadin plugins are used in the same project (usually the MPR), they both publish vaadin{} Gradle configuration extension which conflicts and will make Gradle fail with an exception. The simplest solution is to rename the extension of com.vaadin to something else. Options:

  1. Make com.vaadin to rename the extension to something else only when com.devsoap.plugin.vaadin is discovered? OR
  2. Rename the com.vaadin extension permanently to something else.

Possible new names:

  1. vaadin10
  2. vaadin14
  3. vaadinFlow
  4. Possibly others?

@mstahv what is your opinion please?

mvysny commented 4 years ago

The exception, for future reference:

Caused by: java.lang.IllegalArgumentException: Cannot add extension with name 'vaadin', as there is an extension already registered with that name.
        at org.gradle.internal.extensibility.ExtensionsStorage.add(ExtensionsStorage.java:40)
        at org.gradle.internal.extensibility.DefaultConvention.add(DefaultConvention.java:119)
        at org.gradle.internal.extensibility.DefaultConvention.addWithDefaultPublicType(DefaultConvention.java:220)
        at org.gradle.internal.extensibility.DefaultConvention.create(DefaultConvention.java:125)
        at com.vaadin.gradle.VaadinPlugin$_apply_closure1$_closure4.doCall(VaadinPlugin.groovy:112)
        at com.vaadin.gradle.VaadinPlugin$_apply_closure1.doCall(VaadinPlugin.groovy:106)
        at com.vaadin.gradle.VaadinPlugin.apply(VaadinPlugin.groovy:98)