How to do multiple wro.groovy files

14 views
Skip to first unread message

Elie Delorme

unread,
Feb 10, 2015, 11:19:37 AM2/10/15
to wr...@googlegroups.com
Hi,
I'm basically looking for a way to do the equivalent of the "import" feature of wro.xml files (discussed here: https://code.google.com/p/wro4j/issues/detail?id=181).
Basically having multiple groovy configuration files, ie:
wro.groovy
wro.common.groovy

I looked through the documentation files but couldn't find anything.
Or maybe this is something that can be done through "pure" groovy DSL (ie: evaluate)?

thanks

Alex Objelean

unread,
Feb 10, 2015, 12:06:07 PM2/10/15
to wr...@googlegroups.com
This is not supported out of the box. 
However, the WroModel expose the merge operation, so you could create an implementation of WroModelFactory which aggregates the results of GroovyModelFactory for different groovy resources and merge them into a single model. 

This might be a nice addition. If you are willing to extend the GroovyModelFactory, so that it could accept imports and share your contribution, I will gladly include into the next release.

Cheers,
Alex
Reply all
Reply to author
Forward
0 new messages