Skip to content

pvnhome/pvn_shrinkwrap4gradle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ShrinkWrap resolver for Gradle

ShrinkWrap resolver is the utility to obtain artifacts from a Gradle based projects depengencies using Gradle Tooling API.

Resolution of libraries included in WAR lib folder

Resolution of libraries included in WAR lib folder is very simple:

Collection<? extends Archive> libs = WarLibResolver.resolve().asList(JavaArchive.class);

WebArchive war = ShrinkWrap.create(WebArchive.class, "some.war")
                           // add other artifacts
                           // .addClass(AppConsts.class)
                           // .addClass(AppProps.class)
                           // etc.
                           .addAsLibraries((Collection<? extends Archive<?>>)libs);