}
return ShrinkWrap.create(ZipImporter.class, archive.getName()).importFrom(result).as(clazz);
}
private File importFromDefaultLibsDirectory() {
final GradleProject currentGradleProject = findCurrentGradleProject();
final File buildDir = currentGradleProject.getBuildDirectory();
final File libsDir = new File(buildDir, "libs");
final File[] results = libsDir.listFiles(new FilenameFilter() {
@Override
public boolean accept(final File dir, final String name) {
return name.startsWith(currentGradleProject.getName());
}
});
if (results == null || results.length == 0) {
throw new IllegalArgumentException(