2121import java .io .OutputStream ;
2222import java .util .ArrayList ;
2323import java .util .Arrays ;
24- import java .util .concurrent .Executor ;
2524
2625import org .gradle .api .internal .file .FileResolver ;
2726import org .gradle .initialization .DefaultBuildCancellationToken ;
27+ import org .gradle .internal .concurrent .DefaultExecutorFactory ;
2828import org .gradle .process .internal .DefaultExecAction ;
2929
3030import com .inet .gradle .setup .util .IndentationOutputStream ;
@@ -132,19 +132,9 @@ protected void exec( ArrayList<String> parameters, InputStream input, OutputStre
132132 /*// if gradleVersion < 4.5
133133 DefaultExecAction action = new DefaultExecAction( fileResolver );
134134 //// elif gradleVersion < 4.8
135- DefaultExecAction action = new DefaultExecAction( fileResolver, new Executor() {
136- @Override
137- public void execute( Runnable command ) {
138- command.run();
139- }
140- } );
135+ DefaultExecAction action = new DefaultExecAction( fileResolver, new DefaultExecutorFactory().create( "exec setup" ) );
141136 */ // else
142- DefaultExecAction action = new DefaultExecAction ( fileResolver , new Executor () {
143- @ Override
144- public void execute ( Runnable command ) {
145- command .run ();
146- }
147- }, new DefaultBuildCancellationToken ());
137+ DefaultExecAction action = new DefaultExecAction ( fileResolver , new DefaultExecutorFactory ().create ( "exec setup" ), new DefaultBuildCancellationToken ());
148138 //// endif
149139 action .setCommandLine ( parameters );
150140 action .setIgnoreExitValue ( ignoreExitValue );
@@ -156,6 +146,7 @@ public void execute( Runnable command ) {
156146 output = new IndentationOutputStream ( System .out );
157147 }
158148 action .setStandardOutput ( output );
149+ action .setErrorOutput ( output );
159150 try {
160151 action .execute ();
161152 output .flush ();
0 commit comments