开发者

How to set up dependencies that should be enabled only in test or dev mode in play framework?

开发者 https://www.devze.com 2023-03-08 12:03 出处:网络
Currently the play framework documentation says how to setup dependencies for the whole project without dividing them between running modes. The previous method allowed this by putting something l开发

Currently the play framework documentation says how to setup dependencies for the whole project without dividing them between running modes. The previous method allowed this by putting something l开发者_运维问答ike %test. before module definitions in the application.conf file (which still works).

Is there a way to do it right in the dependencies.yml file, or should it be still mixed with the old method?


I may be wrong but I don't think it's possible to differentiate dependencies between dev/prod/test mode.
The %test was designed only to set some configurations, not change the deps IMO. But, modifying the DependencyManager play class to manage a different dependencies.yml according to the running mode shouldn't be difficult.
We could almost ask directly to play list if people would like to have it.

0

精彩评论

暂无评论...
验证码 换一张
取 消