Gradle 2.13-rc-1 TestKit in IDE

(Jon Schneider) #1

@bmuschko Classpath ordering seems to matter for TestKit in 2.13, causing this kind of error in IntelliJ. Same test succeeds on the command line.

java.lang.NoSuchMethodError: org.gradle.tooling.internal.consumer.DefaultBuildLauncher.withInjectedClassPath(Lorg/gradle/testkit/jarjar/org/gradle/internal/classpath/ClassPath;)Lorg/gradle/tooling/internal/consumer/AbstractLongRunningOperation;


You should be able to reproduce by importing the gradle-2.13 branch of gradle-lint into IntelliJ. The failing test is UnusedDependencyRuleSpec.

cc @Danny_Thomas1 @rspieldenner_netflix

(Benjamin Muschko) #2

Thanks for reporting. This is a known issue and will be fixed with 2.14. Please see another post for more information. As a workaround in the meantime you can reorder the classpath by moving the TestKit JAR before the Tooling API JAR.