use of org.shipkit.internal.exec.SilentExecTask in project shipkit by mockito.
the class TestDownstreamTask method createRunTestReleaseTask.
private void createRunTestReleaseTask(final String camelCaseRepoName, CloneGitRepositoryTask copy) {
final File buildOutputFile = new File(logsDirectory, camelCaseRepoName + "-build.log");
SilentExecTask run = getProject().getTasks().create("test" + capitalize(camelCaseRepoName), SilentExecTask.class);
run.dependsOn(copy);
run.finalizedBy(uploadGistsTask);
run.setWorkDir(copy.getTargetDir());
dependsOn(run);
// Using Gradle's composite builds ("--include-build") so that we're picking up current version of tools
run.setCommand(asList("./gradlew", "releaseNeeded", "performRelease", "releaseCleanUp", "-PdryRun", "-x", "gitPush", "-x", "bintrayUpload", "--include-build", getProject().getRootDir().getAbsolutePath(), "-s"));
// Build log in separate file instead of including it in the console of the parent build
// Otherwise the output will be really messy
run.setBuildOutputFile(buildOutputFile);
run.doFirst(new Action<Task>() {
@Override
public void execute(Task task) {
LOG.lifecycle(testDownstreamLogMessage(camelCaseRepoName, buildOutputFile, uploadGistsTask.isEnabled(), uploadGistsTask.getName()));
}
});
}
Aggregations