static DependenciesImpl cloneDependencies(
@NonNull BaseVariantData variantData,
@NonNull BasePlugin basePlugin,
@NonNull Set<Project> gradleProjects) {
VariantDependencies variantDependencies = variantData.getVariantDependency();
List<AndroidLibrary> libraries;
List<File> jars;
List<String> projects;
List<LibraryDependencyImpl> libs = variantDependencies.getLibraries();
libraries = Lists.newArrayListWithCapacity(libs.size());
for (LibraryDependencyImpl libImpl : libs) {
AndroidLibrary clonedLib = getAndroidLibrary(libImpl, gradleProjects);
libraries.add(clonedLib);
}
List<JarDependency> jarDeps = variantDependencies.getJarDependencies();
List<JarDependency> localDeps = variantDependencies.getLocalDependencies();
jars = Lists.newArrayListWithExpectedSize(jarDeps.size() + localDeps.size());
projects = Lists.newArrayList();
for (JarDependency jarDep : jarDeps) {