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

vaadin-gradle-plugin 17.0.1 does not work with latest flow-server #100

Closed stbischof closed 3 years ago

stbischof commented 3 years ago

Desktop (please complete the following information):

Describe the bug vaadin-gradle-plugin 17.0.1 does not work with newest snapshot version since https://github.com/vaadin/flow/commit/bd84a1d4a7932f92c2f08f30cfe015ec59969a73

Caused by: java.lang.IllegalArgumentException: wrong number of arguments
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at com.vaadin.flow.server.webcomponent.WebComponentModulesWriter$DirectoryWriter.generateWebComponentsToDirectory(WebComponentModulesWriter.java:237)
        at com.vaadin.flow.server.frontend.FrontendWebComponentGenerator.generateWebComponents(FrontendWebComponentGenerator.java:85)
        at com.vaadin.flow.server.frontend.NodeTasks.<init>(NodeTasks.java:510)
        at com.vaadin.flow.server.frontend.NodeTasks.<init>(NodeTasks.java:46)
        at com.vaadin.flow.server.frontend.NodeTasks$Builder.build(NodeTasks.java:187)
mvysny commented 3 years ago

Hello, thank you for letting me know! Unfortunately I am unable to reproduce the issue on Vaadin 19.0.0.alpha1. I've pushed an example project to https://github.com/vaadin/base-starter-gradle/tree/master (the master branch) - running ./gradlew vaadinClean build appRun works for me and will start the app correctly.

Could you please post a zip of a project which fails to build for you?

mvysny commented 3 years ago

You're right! I've managed to reproduce the issue. Steps to reproduce:

  1. check out https://github.com/vaadin/base-starter-gradle/tree/master
  2. Build with ./gradlew -Pvaadin.productionMode.
mvysny commented 3 years ago

I've proposed a much simplified maintenance scheme to the upstream: https://github.com/vaadin/flow/issues/9685

ollin commented 3 years ago

Hello, as far as I can see the vaadin/flow#9685 is solved. Do you have any plans when you can integrate the extracted part so that this bug goes away?

mvysny commented 3 years ago

In fact yes. The flow ticket is going to be eventually merged into vaadin 20.alpha or such. When it does (or a bit before perhaps), I'll work on the support from the Gradle plugin side. However, the target for this is vaadin 20.

mvysny commented 3 years ago

A preliminary support for Vaadin 20 has been developed at https://github.com/vaadin/vaadin-gradle-plugin/tree/feature/vaadin20 . All tests pass, which is really encouraging. It is possible that the plugin will also work with Vaadin 19. I will test a bit today, then we can hopefully release. Stay tuned :)

stbischof commented 3 years ago

This would have effect on the Plugin. https://github.com/vaadin/flow/pull/10319

mvysny commented 3 years ago

@stbischof sounds good! However, to keep track, could you please open a new bug report, explaining why it would be good to have such a config option? I will then track the PR and flow releases.

stbischof commented 3 years ago

Is this one in flow enough Or should i open an issues here? https://github.com/vaadin/flow/issues/10318

mvysny commented 3 years ago

Please also open a ticket here, because the Gradle plugin then needs to expose the config setting in the Extension.

mvysny commented 3 years ago

We will release a new version of the plugin soonish (today), but there will be one known issue:

mvysny commented 3 years ago

PR: #105

mvysny commented 3 years ago

Vaadin Gradle plugin 0.20.0.0.alpha3 has been released, enjoy :+1: I'm porting the example apps now.

evan-miller-jumpmind commented 3 years ago

I'm trying to use the unofficial version of the plugin (0.14.5.1) to build a Vaadin 14 application and I'm encountering this same issue. Would it be possible to fix it for this version as well, or are there any workarounds I can try?

mvysny commented 3 years ago

Yes I've also encountered similar bug when building an app with plugin 0.14.5.1 and Vaadin 14.6.0. Could you open a new bug report in this regard please?