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 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);