You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm applying a classpath to all tests in a multi-project build using tasks.withType. This causes the testClassesDirs to not be on the classpath of the test task configured by the plugin. Here is a test case to reproduce. Save the file as build.gradle and run with gradle clean -q -PadditionalClasspath and then with ./gradlew clean -q. You'll see the following outputs:
As you'll see integrationTest dir is nowhere on the classpath in one of the cases. I'll and work on a fix in the plugin, but in the meanwhile, if there's a workaround — I'd appreciate any pointers :)
I'm afraid this is not a bug - the plugin uses Gradle's convention mapping mechanism to configure the test task. The conventional / default values are not applied once you configure them directly, like classpath in your example.
What you could try is to wrap your additional classpath configuration inside a project.afterEvaluate { } block. That way it should be applied only after the convention mappings.
I'm applying a
classpath
to all tests in a multi-project build usingtasks.withType
. This causes thetestClassesDirs
to not be on the classpath of the test task configured by the plugin. Here is a test case to reproduce. Save the file asbuild.gradle
and run withgradle clean -q -PadditionalClasspath
and then with./gradlew clean -q
. You'll see the following outputs:As you'll see
integrationTest
dir is nowhere on the classpath in one of the cases. I'll and work on a fix in the plugin, but in the meanwhile, if there's a workaround — I'd appreciate any pointers :)The text was updated successfully, but these errors were encountered: