Search in sources :

Example 6 with LibraryDependency

use of com.android.builder.dependency.LibraryDependency in project atlas by alibaba.

the class DependencyConvertUtils method toAwbBundle.

public static AwbBundle toAwbBundle(ResolvedDependencyInfo resolvedDependencyInfo) {
    assertType(Type.AWB, resolvedDependencyInfo);
    List<LibraryDependency> dependencies = Lists.newArrayList();
    Collection<JarDependency> jarDependencies = Lists.newArrayList();
    List<SoLibrary> soLibraries = Lists.newArrayList();
    collectChildren(resolvedDependencyInfo, dependencies, jarDependencies, soLibraries);
    AwbBundle awbBundle = new AwbBundle(resolvedDependencyInfo.getResolvedArtifact().getFile(), resolvedDependencyInfo.getExplodedDir(), dependencies, jarDependencies, resolvedDependencyInfo.getGroup() + "-" + resolvedDependencyInfo.getName(), resolvedDependencyInfo.getVariantName(), resolvedDependencyInfo.getGradlePath(), null, convert(resolvedDependencyInfo.getResolvedArtifact()));
    awbBundle.setSoLibraries(soLibraries);
    return awbBundle;
}
Also used : JarDependency(com.android.builder.dependency.JarDependency) LibraryDependency(com.android.builder.dependency.LibraryDependency) SoLibrary(com.taobao.android.builder.dependency.model.SoLibrary) AwbBundle(com.taobao.android.builder.dependency.model.AwbBundle)

Example 7 with LibraryDependency

use of com.android.builder.dependency.LibraryDependency in project atlas by alibaba.

the class TDependencyManager method recursiveLibSkip.

private static void recursiveLibSkip(@NonNull List<LibraryDependency> libs) {
    for (LibraryDependency lib : libs) {
        lib.skip();
        //noinspection unchecked
        recursiveLibSkip((List<LibraryDependency>) lib.getLibraryDependencies());
        //noinspection unchecked
        recursiveJavaSkip((List<JarDependency>) lib.getJavaDependencies());
    }
}
Also used : JarDependency(com.android.builder.dependency.JarDependency) LibraryDependency(com.android.builder.dependency.LibraryDependency)

Aggregations

LibraryDependency (com.android.builder.dependency.LibraryDependency)7 JarDependency (com.android.builder.dependency.JarDependency)6 File (java.io.File)3 MavenCoordinates (com.android.builder.model.MavenCoordinates)2 ImmutableList (com.google.common.collect.ImmutableList)2 AwbBundle (com.taobao.android.builder.dependency.model.AwbBundle)2 SoLibrary (com.taobao.android.builder.dependency.model.SoLibrary)2 ArrayList (java.util.ArrayList)2 List (java.util.List)2 ModuleVersionIdentifier (org.gradle.api.artifacts.ModuleVersionIdentifier)2 ComponentSelector (org.gradle.api.artifacts.component.ComponentSelector)2 DependencyResult (org.gradle.api.artifacts.result.DependencyResult)2 ResolvedDependencyResult (org.gradle.api.artifacts.result.ResolvedDependencyResult)2 UnresolvedDependencyResult (org.gradle.api.artifacts.result.UnresolvedDependencyResult)2 NonNull (com.android.annotations.NonNull)1 PrepareLibraryTask (com.android.build.gradle.internal.tasks.PrepareLibraryTask)1 DependencyContainerImpl (com.android.builder.dependency.DependencyContainerImpl)1 MavenCoordinatesImpl (com.android.builder.dependency.MavenCoordinatesImpl)1 AndroidLibrary (com.android.builder.model.AndroidLibrary)1 AndroidDependencyTree (com.taobao.android.builder.dependency.AndroidDependencyTree)1