org.gradle.tooling.ResultHandler Java Examples

The following examples show how to use org.gradle.tooling.ResultHandler. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GradleConnector.java    From MSPaintIDE with MIT License 6 votes vote down vote up
public void runTask(OutputStream out, OutputStream err, String... tasks) {
    LOGGER.info("Running task(s) {}", String.join(" ", tasks));
    try (ProjectConnection connection = connector.connect()) {
        connection.newBuild().setStandardOutput(out).setStandardError(err).forTasks(tasks).run(new ResultHandler<>() {
            @Override
            public void onComplete(Void result) {
                LOGGER.info("Finished {}", String.join(" ", tasks));
            }

            @Override
            public void onFailure(GradleConnectionException failure) {
                LOGGER.error("Failed to execute " + String.join(" ", tasks), failure.fillInStackTrace());
            }
        });
    }
}
 
Example #2
Source File: BuildLauncherBackedGradleHandle.java    From paraphrase with Apache License 2.0 5 votes vote down vote up
public BuildLauncherBackedGradleHandle(BuildLauncher launcher) {
    launcher.setStandardOutput(standardOutput);
    launcher.setStandardError(standardError);

    launcher.run(new ResultHandler<Void>() {
        public void onComplete(Void result) {
            finish();
        }

        public void onFailure(GradleConnectionException failure) {
            exception = failure;
            finish();
        }
    });
}
 
Example #3
Source File: ResultHandlerAdapter.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
ResultHandlerAdapter(ResultHandler<? super T> handler) {
    this.handler = handler;
}
 
Example #4
Source File: DefaultBuildLauncher.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public ResultHandlerAdapter(ResultHandler<? super Void> handler) {
    super(handler);
}
 
Example #5
Source File: DefaultModelBuilder.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public ResultHandlerAdapter(ResultHandler<? super T> handler) {
    super(handler);
}
 
Example #6
Source File: ResultHandlerAdapter.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
ResultHandlerAdapter(ResultHandler<? super T> handler) {
    this.handler = handler;
}
 
Example #7
Source File: DefaultBuildLauncher.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public ResultHandlerAdapter(ResultHandler<? super Void> handler) {
    super(handler);
}
 
Example #8
Source File: DefaultModelBuilder.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public ResultHandlerAdapter(ResultHandler<? super T> handler) {
    super(handler);
}
 
Example #9
Source File: ResultHandlerAdapter.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
ResultHandlerAdapter(ResultHandler<? super T> handler) {
    this.handler = handler;
}
 
Example #10
Source File: DefaultBuildLauncher.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public ResultHandlerAdapter(ResultHandler<? super Void> handler) {
    super(handler);
}
 
Example #11
Source File: DefaultModelBuilder.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public ResultHandlerAdapter(ResultHandler<? super T> handler) {
    super(handler);
}
 
Example #12
Source File: ResultHandlerAdapter.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
ResultHandlerAdapter(ResultHandler<? super T> handler) {
    this.handler = handler;
}
 
Example #13
Source File: DefaultBuildLauncher.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public ResultHandlerAdapter(ResultHandler<? super Void> handler) {
    super(handler);
}
 
Example #14
Source File: DefaultModelBuilder.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public ResultHandlerAdapter(ResultHandler<? super T> handler) {
    super(handler);
}