johnrengelman / gradle-processes

Gradle Processes Plugin - Create and manage forked processes
Apache License 2.0
40 stars 18 forks source link

Not compatible with gradle 4.8.1 due to changes in gradles internal api #12

Closed Argelbargel closed 6 years ago

Argelbargel commented 6 years ago

Trying to use javafork causes this exception

Caused by: java.lang.NoSuchMethodError: org.gradle.process.internal.JavaExecHandleBuilder.<init>(Lorg/gradle/api/internal/file/FileResolver;Ljava/util/concurrent/Executor;)V
14:59:48    at com.github.jengelman.gradle.plugins.processes.internal.DefaultJavaForkAction.<init>(DefaultJavaForkAction.java:16)
14:59:48    at com.github.jengelman.gradle.plugins.processes.internal.DefaultJavaForkAction_Decorated.<init>(Unknown Source)
14:59:48    at org.gradle.internal.reflect.DirectInstantiator.newInstance(DirectInstantiator.java:51)

Signature of JavaExecHandleBuilders constructor was changed to:

public JavaExecHandleBuilder(FileResolver fileResolver, Executor executor, BuildCancellationToken buildCancellationToken)

Either add new DefaultBuildCancellationToken() when calling the super-constructor in DefaultJavaForkAction (but it seems to be better to use new DefaultExecActionFactory(FileResolver).newJavaExec() instead)