-
Notifications
You must be signed in to change notification settings - Fork 34
Description
Hi,
since the changes in this release: #71 ,
If I create a play 2.6.x project (where I inject components in the template and inject the template at the controller level) and compile and run with gradle I am getting this exception once I reload the page:
Caused by: com.google.inject.ProvisionException: Unable to provision
followed by the errors "Could not find a suitable constructor..." in any controller which has a template that injects org.webjars.play.WebJarsUtil
.
The app runs fine when I build with sbt.
In previous projects using play 2.5.x + gradle + webjars-play (where I injected WebJarAssets
at controller level), the project compiled and ran fine.
The main discernible difference (from a user perspective anyway) is that the routes have changed:
i.e in a working play 2.5.x build I was using:
GET /webjars/*file controllers.WebJarAssets.at(file)
in the current failing play 2.6.x build Im using:
-> /webjars webjars.Routes
From a bit of googling it looks like using a split route file is something specific to the sbt play plugin:
not sure if there is a way to mimic this with the current gradle play plugin:
https://github.com/webjars/webjars-play/blob/master/build.sbt#L15
So I'm hoping you can help me out! A fix so that I can continue to use 2.6.x branch of play with latest webjars-play, or if supporting gradle is off the cards, could we have a documented workaround for this use case? Even if that just means adding some documentation to https://www.webjars.org/documentation#play2 (such as just extracting webjars to lib folder with task or plugin like https://github.com/ia-toki/gradle-play-webjars)
Thanks for the plugin!