Search in sources :

Example 1 with SilentExecTask

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()));
        }
    });
}
Also used : SilentExecTask(org.shipkit.internal.exec.SilentExecTask) UploadGistsTask(org.shipkit.internal.gradle.release.tasks.UploadGistsTask) Task(org.gradle.api.Task) DefaultTask(org.gradle.api.DefaultTask) CloneGitRepositoryTask(org.shipkit.internal.gradle.git.tasks.CloneGitRepositoryTask) File(java.io.File) SilentExecTask(org.shipkit.internal.exec.SilentExecTask)

Aggregations

File (java.io.File)1 DefaultTask (org.gradle.api.DefaultTask)1 Task (org.gradle.api.Task)1 SilentExecTask (org.shipkit.internal.exec.SilentExecTask)1 CloneGitRepositoryTask (org.shipkit.internal.gradle.git.tasks.CloneGitRepositoryTask)1 UploadGistsTask (org.shipkit.internal.gradle.release.tasks.UploadGistsTask)1