Gradle 2.13-rc-1 TestKit in IDE

@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;

at org.gradle.testkit.runner.internal.ToolingApiGradleExecutor.run(ToolingApiGradleExecutor.java:98)
at org.gradle.testkit.runner.internal.DefaultGradleRunner.run(DefaultGradleRunner.java:270)
at org.gradle.testkit.runner.internal.DefaultGradleRunner.build(DefaultGradleRunner.java:219)

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

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.