本文整理了Java中org.gradle.api.Task.mustRunAfter()
方法的一些代码示例,展示了Task.mustRunAfter()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Task.mustRunAfter()
方法的具体详情如下:
包路径:org.gradle.api.Task
类名称:Task
方法名:mustRunAfter
暂无
代码示例来源:origin: gradle.plugin.org.shipkit/shipkit
public void execute(final Task t) {
t.setDescription("Performs " + SOFT_RESET_COMMIT_TASK + " and " + GIT_STASH_TASK + " tasks.");
t.dependsOn(SOFT_RESET_COMMIT_TASK, GIT_STASH_TASK);
t.mustRunAfter(performPush);
}
});
代码示例来源:origin: org.shipkit/shipkit
public void execute(final Task t) {
t.setDescription("Performs " + SOFT_RESET_COMMIT_TASK + " and " + GIT_STASH_TASK + " tasks.");
t.dependsOn(SOFT_RESET_COMMIT_TASK, GIT_STASH_TASK);
t.mustRunAfter(performPush);
}
});
代码示例来源:origin: mockito/shipkit
public void execute(final Task t) {
t.setDescription("Performs " + SOFT_RESET_COMMIT_TASK + " and " + GIT_STASH_TASK + " tasks.");
t.dependsOn(SOFT_RESET_COMMIT_TASK, GIT_STASH_TASK);
t.mustRunAfter(performPush);
}
});
代码示例来源:origin: gradle.plugin.com.intershop.gradle.plugin.azure/azurePlugin
@Override
void configure(Task task)
{
super.configure(task);
Task cleanupTestEnvTask = project.getTasks().findByName(AzurePlugin.CLEANUP_TEST_ENV_TASK);
Task createTestRGTask = project.getTasks().findByName(AzurePlugin.CREATE_TEST_RG_TASK);
Task uploadTestTemplateTask = project.getTasks().findByPath(AzurePlugin.UPLOAD_TEST_TEMPLATE_TASK);
task.setDescription("Ensures the deletion of all test resources after azureTest was called");
task.finalizedBy(cleanupTestEnvTask);
createTestRGTask.mustRunAfter(task);
uploadTestTemplateTask.mustRunAfter(task);
}
}
代码示例来源:origin: gradle.plugin.com.palantir.python/gradle-miniconda-plugin
public static Delete createCleanupTask(TaskContainer tasks, Task task) {
String cleanTaskName = getCleanTaskName(task);
Delete clean = tasks.create(cleanTaskName, Delete.class);
clean.setGroup(task.getGroup());
clean.setDescription("Cleans for " + task.getName());
clean.delete(task.getOutputs().getFiles());
task.mustRunAfter(clean);
return clean;
}
代码示例来源:origin: mockito/shipkit
@Override
public void apply(final Project project) {
project.getPlugins().apply(GitHubContributorsPlugin.class);
final Task fetcher = project.getTasks().getByName(GitHubContributorsPlugin.FETCH_CONTRIBUTORS);
project.allprojects(subproject ->
subproject.getPlugins().withType(JavaBintrayPlugin.class, plugin -> {
//Because maven-publish plugin uses new configuration model, we cannot get the task directly
//So we use 'matching' technique.
subproject.getTasks().matching(withName(POM_TASK)).all(t -> t.mustRunAfter(fetcher));
//Pom task needs data from fetcher hence 'mustRunAfter' above.
//We don't use 'dependsOn' because we want the fetcher to be included only when we are publishing to Bintray
Task upload = subproject.getTasks().getByName(ShipkitBintrayPlugin.BINTRAY_UPLOAD_TASK);
upload.dependsOn(fetcher);
}));
}
}
代码示例来源:origin: org.shipkit/shipkit
@Override
public void apply(final Project project) {
project.getPlugins().apply(GitHubContributorsPlugin.class);
final Task fetcher = project.getTasks().getByName(GitHubContributorsPlugin.FETCH_CONTRIBUTORS);
project.allprojects(subproject ->
subproject.getPlugins().withType(JavaBintrayPlugin.class, plugin -> {
//Because maven-publish plugin uses new configuration model, we cannot get the task directly
//So we use 'matching' technique.
subproject.getTasks().matching(withName(POM_TASK)).all(t -> t.mustRunAfter(fetcher));
//Pom task needs data from fetcher hence 'mustRunAfter' above.
//We don't use 'dependsOn' because we want the fetcher to be included only when we are publishing to Bintray
Task upload = subproject.getTasks().getByName(ShipkitBintrayPlugin.BINTRAY_UPLOAD_TASK);
upload.dependsOn(fetcher);
}));
}
}
代码示例来源:origin: diffplug/goomph
ide.setGroup(TASK_GROUP);
ide.setDescription(IDE_CLEAN_DESC);
ideSetupP2.mustRunAfter(ideClean);
ideSetupWorkspace.mustRunAfter(ideClean);
代码示例来源:origin: gradle.plugin.org.mockito/release
postStep.mustRunAfter(steps);
previousPostStep.mustRunAfter(postStep);
代码示例来源:origin: gradle.plugin.mpern.sap.commerce/commerce-gradle-plugin
@Override
public void apply(Project project) {
PackagingExtension extension = project.getExtensions().create(EXTENSION, PackagingExtension.class, project);
extension.getPlatformZip().set(project.file("hybris/temp/hybris/hybrisServer/hybrisServer-Platform.zip"));
extension.getAllExtensionsZip().set(project.file("hybris/temp/hybris/hybrisServer/hybrisServer-AllExtensions.zip"));
extension.getEnvironments().set(project.provider(() -> new HashSet<>(Arrays.asList("dev", "stag", "prod"))));
extension.getPreProductionEnvironment().set("stag");
extension.getProjectID().set(project.provider(project::getName));
extension.getConfigurationFolder().set(project.file("ccv1-configuration"));
extension.getDistributionFolder().set(project.file("dist"));
extension.getTempFolder().set(project.file("temp"));
Task bootstrap = project.getTasks().create("bootstrapCCV1Config");
bootstrap.setGroup(GROUP);
bootstrap.setDescription("Creates environment config folders, if they don't exist");
project.afterEvaluate(p -> setupBootstrap(p, bootstrap, extension));
Delete cleanTempFolder = project.getTasks().create("cleanTemp", Delete.class, t -> {
t.delete(extension.getTempFolder());
});
cleanTempFolder.setGroup(GROUP);
cleanTempFolder.setDescription("cleans temp folder used to assemble the final package");
Task buildPackage = project.getTasks().create("buildCCV1Package");
buildPackage.setGroup(GROUP);
buildPackage.setDescription("Builds a distribution package based on Deployment Packaging Guidelines (v.2.3.3)");
project.afterEvaluate(p -> setupPackaging(p, buildPackage, extension));
project.getPlugins().withType(HybrisPlugin.class, hybrisPlugin -> {
//sensible defaults
buildPackage.mustRunAfter(project.getTasks().getByPath("yproduction"));
});
}
代码示例来源:origin: mockito/shipkit
publishPlugins.mustRunAfter(gitPush); //git push is easier to revert than perform release
gitPush.mustRunAfter(archivesTask);
代码示例来源:origin: gradle.plugin.mpern.sap.commerce/commerce-gradle-plugin
t.onlyIf(o -> versionMismatch(extension, t.getLogger()));
});
unpackPlatform.mustRunAfter(cleanOnVersionChange);
t.into(driverDir);
});
setupDBDriver.mustRunAfter(unpackPlatform);
touchDbDriverLastUpdate.mustRunAfter(unpackPlatform, setupDBDriver);
Task yproduction = project.getTasks().getByPath("yproduction");
ybuild.mustRunAfter(yclean, ycustomize);
yall.mustRunAfter(yclean, ycustomize);
yproduction.mustRunAfter(ybuild, yall);
代码示例来源:origin: mockito/shipkit
bintrayUpload.mustRunAfter(gitPush);
gitPush.mustRunAfter(mavenLocalTask);
});
代码示例来源:origin: org.shipkit/shipkit
publishPlugins.mustRunAfter(gitPush); //git push is easier to revert than perform release
gitPush.mustRunAfter(archivesTask);
代码示例来源:origin: org.shipkit/shipkit
bintrayUpload.mustRunAfter(gitPush);
gitPush.mustRunAfter(mavenLocalTask);
});
代码示例来源:origin: MinecraftForge/ForgeGradle
project.getTasks().getByName(TASK_GEN_IDES).mustRunAfter(makeStart);
内容来源于网络,如有侵权,请联系作者删除!