Search in sources :

Example 1 with MergeAwbAssets

use of com.taobao.android.builder.tasks.app.merge.bundle.MergeAwbAssets in project atlas by alibaba.

the class MergeAssetAwbsConfigAction method execute.

@Override
public void execute(MtlParallelTask parallelTask) {
    super.execute(parallelTask);
    AtlasDependencyTree atlasDependencyTree = AtlasBuildContext.androidDependencyTrees.get(parallelTask.getVariantName());
    if (null == atlasDependencyTree) {
        return;
    }
    List<DefaultTask> tasks = new ArrayList<DefaultTask>();
    for (final AwbBundle awbBundle : atlasDependencyTree.getAwbBundles()) {
        if (awbBundle.isMBundle) {
            continue;
        }
        MergeAwbAssets.MergeAwbAssetConfigAction mergeAwbAssetConfigAction = new MergeAwbAssets.MergeAwbAssetConfigAction(appVariantContext, baseVariantOutput, awbBundle);
        MergeAwbAssets mergeTask = TaskCreater.create(appVariantContext.getProject(), mergeAwbAssetConfigAction.getName(), mergeAwbAssetConfigAction.getType());
        mergeAwbAssetConfigAction.execute(mergeTask);
        tasks.add(mergeTask);
    }
    parallelTask.parallelTask = tasks;
    parallelTask.concurrent = false;
    parallelTask.uniqueTaskName = getName();
}
Also used : MergeAwbAssets(com.taobao.android.builder.tasks.app.merge.bundle.MergeAwbAssets) DefaultTask(org.gradle.api.DefaultTask) ArrayList(java.util.ArrayList) AwbBundle(com.taobao.android.builder.dependency.model.AwbBundle) AtlasDependencyTree(com.taobao.android.builder.dependency.AtlasDependencyTree)

Example 2 with MergeAwbAssets

use of com.taobao.android.builder.tasks.app.merge.bundle.MergeAwbAssets in project atlas by alibaba.

the class MergeAwbsJniFolder method execute.

@Override
public void execute(MtlParallelTask parallelTask) {
    super.execute(parallelTask);
    AtlasDependencyTree atlasDependencyTree = AtlasBuildContext.androidDependencyTrees.get(parallelTask.getVariantName());
    if (null == atlasDependencyTree) {
        return;
    }
    List<DefaultTask> tasks = new ArrayList<DefaultTask>();
    for (final AwbBundle awbBundle : atlasDependencyTree.getAwbBundles()) {
        MergeAwbAssets.MergeAwbJniLibFoldersConfigAction mergeAwbJniLibFoldersConfigAction = new MergeAwbAssets.MergeAwbJniLibFoldersConfigAction(appVariantContext, baseVariantOutput, awbBundle);
        MergeAwbAssets mergeTask = TaskCreater.create(appVariantContext.getProject(), mergeAwbJniLibFoldersConfigAction.getName(), mergeAwbJniLibFoldersConfigAction.getType());
        mergeAwbJniLibFoldersConfigAction.execute(mergeTask);
        tasks.add(mergeTask);
    }
    parallelTask.parallelTask = tasks;
    parallelTask.concurrent = false;
    parallelTask.uniqueTaskName = getName();
}
Also used : MergeAwbAssets(com.taobao.android.builder.tasks.app.merge.bundle.MergeAwbAssets) DefaultTask(org.gradle.api.DefaultTask) ArrayList(java.util.ArrayList) AwbBundle(com.taobao.android.builder.dependency.model.AwbBundle) AtlasDependencyTree(com.taobao.android.builder.dependency.AtlasDependencyTree)

Aggregations

AtlasDependencyTree (com.taobao.android.builder.dependency.AtlasDependencyTree)2 AwbBundle (com.taobao.android.builder.dependency.model.AwbBundle)2 MergeAwbAssets (com.taobao.android.builder.tasks.app.merge.bundle.MergeAwbAssets)2 ArrayList (java.util.ArrayList)2 DefaultTask (org.gradle.api.DefaultTask)2