use of com.taobao.android.builder.tasks.awo.utils.AwoDependency in project atlas by alibaba.
the class AtlasLibTaskManager method createAwbBundle.
private AwbBundle createAwbBundle(LibVariantContext libVariantContext, String variantName) throws IOException {
AndroidDependencyTree libDependencyTree = AtlasBuildContext.libDependencyTrees.get(variantName);
if (null == libDependencyTree) {
dependencyManager.resolveDependencyForConfig(libVariantContext.getVariantDependency(), true);
libDependencyTree = AtlasBuildContext.libDependencyTrees.get(variantName);
}
String groupName = (String) project.getGroup();
String name = "";
String version = (String) project.getVersion();
if (project.hasProperty("archivesBaseName")) {
name = (String) project.getProperties().get("archivesBaseName");
} else {
name = project.getName();
}
File explodedDir = project.file(project.getBuildDir().getAbsolutePath() + "/" + FD_INTERMEDIATES + "/exploded-awb/" + computeArtifactPath(groupName, name, version));
FileUtils.deleteDirectory(explodedDir);
AwbBundle awbBundle = new AwbBundle(libVariantContext.getBundleTask().getArchivePath(), explodedDir, new ArrayList<LibraryDependency>(), new ArrayList<JarDependency>(), groupName + ":" + name, libVariantContext.getVariantName(), project.getPath(), null, new MavenCoordinatesImpl(groupName, name, version));
new AwoDependency(libVariantContext).parseDependency(libDependencyTree, awbBundle);
return awbBundle;
}
use of com.taobao.android.builder.tasks.awo.utils.AwoDependency in project atlas by alibaba.
the class PrepareMainDexJarsTask method doFullTaskAction.
@TaskAction
public void doFullTaskAction() {
AndroidDependencyTree libDependencyTree = AtlasBuildContext.libDependencyTrees.get(this.getVariantName());
if (null == libDependencyTree) {
throw new GradleException("The libDependencyTree is null!");
}
List<File> jarList = new AwoDependency(libVariantContext).getDependencyJar(libDependencyTree);
libVariantContext.setJarDexList(jarList);
}
Aggregations