use of com.android.build.gradle.internal.tasks.databinding.DataBindingProcessLayoutsTask in project atlas by alibaba.
the class DataBindingProcessLayoutAwbsConfigAction method execute.
@Override
public void execute(MtlParallelTask parallelTask) {
super.execute(parallelTask);
AndroidDependencyTree androidDependencyTree = AtlasBuildContext.androidDependencyTrees.get(parallelTask.getVariantName());
if (null == androidDependencyTree) {
return;
}
DataBindingBuilder dataBindingBuilder = new DataBindingBuilder();
dataBindingBuilder.setPrintMachineReadableOutput(false);
dataBindingBuilder.setDebugLogEnabled(appVariantContext.getProject().getLogger().isDebugEnabled());
List<DefaultTask> tasks = new ArrayList<DefaultTask>();
for (final AwbBundle awbBundle : androidDependencyTree.getAwbBundles()) {
AwbDataBindingProcessLayoutsConfigAction processLayoutsConfigAction = new AwbDataBindingProcessLayoutsConfigAction(appVariantContext, awbBundle, dataBindingBuilder);
DataBindingProcessLayoutsTask dataBindingProcessLayoutsTask = TaskCreater.create(appVariantContext.getProject(), processLayoutsConfigAction.getName(), processLayoutsConfigAction.getType());
processLayoutsConfigAction.execute(dataBindingProcessLayoutsTask);
tasks.add(dataBindingProcessLayoutsTask);
}
parallelTask.parallelTask = tasks;
parallelTask.uniqueTaskName = getName();
parallelTask.concurrent = true;
}
Aggregations