use of org.gradle.api.DefaultTask in project gradle by gradle.
the class JavaBasePlugin method configureBuildDependents.
private void configureBuildDependents(Project project) {
DefaultTask buildTask = project.getTasks().create(BUILD_DEPENDENTS_TASK_NAME, DefaultTask.class);
buildTask.setDescription("Assembles and tests this project and all projects that depend on it.");
buildTask.setGroup(BasePlugin.BUILD_GROUP);
buildTask.dependsOn(BUILD_TASK_NAME);
buildTask.doFirst(new Action<Task>() {
@Override
public void execute(Task task) {
if (!task.getProject().getGradle().getIncludedBuilds().isEmpty()) {
task.getProject().getLogger().warn("[composite-build] Warning: `" + task.getPath() + "` task does not build included builds.");
}
}
});
}
use of org.gradle.api.DefaultTask in project gradle by gradle.
the class JavaBasePlugin method configureBuildNeeded.
private void configureBuildNeeded(Project project) {
DefaultTask buildTask = project.getTasks().create(BUILD_NEEDED_TASK_NAME, DefaultTask.class);
buildTask.setDescription("Assembles and tests this project and all projects it depends on.");
buildTask.setGroup(BasePlugin.BUILD_GROUP);
buildTask.dependsOn(BUILD_TASK_NAME);
}
use of org.gradle.api.DefaultTask in project atlas by alibaba.
the class DataBindingExportBuildInfoAwbsConfigAction 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()) {
AwbDataBindingExportBuildInfoConfigAction exportBuildInfoConfigAction = new AwbDataBindingExportBuildInfoConfigAction(appVariantContext, awbBundle, dataBindingBuilder.getPrintMachineReadableOutput(), dataBindingBuilder);
DataBindingExportBuildInfoTask exportBuildInfoTask = TaskCreater.create(appVariantContext.getProject(), exportBuildInfoConfigAction.getName(), exportBuildInfoConfigAction.getType());
exportBuildInfoConfigAction.execute(exportBuildInfoTask);
tasks.add(exportBuildInfoTask);
}
parallelTask.parallelTask = tasks;
parallelTask.uniqueTaskName = getName();
parallelTask.concurrent = true;
}
use of org.gradle.api.DefaultTask in project atlas by alibaba.
the class MergeManifestAwbsConfigAction method execute.
@Override
public void execute(MtlParallelTask parallelTask) {
super.execute(parallelTask);
AndroidDependencyTree androidDependencyTree = AtlasBuildContext.androidDependencyTrees.get(parallelTask.getVariantName());
if (null == androidDependencyTree) {
return;
}
List<DefaultTask> tasks = new ArrayList<DefaultTask>();
AppVariantOutputContext appVariantOutputContext = getAppVariantOutputContext();
for (final AwbBundle awbBundle : androidDependencyTree.getAwbBundles()) {
List<ManifestMerger2.Invoker.Feature> optionalFeatures = ImmutableList.<ManifestMerger2.Invoker.Feature>of();
MergeAwbManifests.ConfigAction configAction = new MergeAwbManifests.ConfigAction(appVariantOutputContext.getOutputScope(), awbBundle, optionalFeatures, appVariantOutputContext);
MergeAwbManifests mergeAwbManifests = TaskCreater.create(appVariantContext.getProject(), configAction.getName(), configAction.getType());
configAction.execute(mergeAwbManifests);
tasks.add(mergeAwbManifests);
}
parallelTask.parallelTask = tasks;
parallelTask.uniqueTaskName = getName();
}
Aggregations