diff --git a/README.md b/README.md index c7c053fc..23f8a133 100644 --- a/README.md +++ b/README.md @@ -173,7 +173,7 @@ to add integration tests located in a different source set) another Java processes for mutation testing execution and usually `jvmArgs` should be used to for example increase maximum memory size (see [#7](https://github.com/szpak/gradle-pitest-plugin/issues/7)); - `additionalMutableCodePaths` - additional classes to mutate (useful for integration tests with production code in a different module - see [#25](https://github.com/szpak/gradle-pitest-plugin/issues/25)) - - `useClasspathFile` - enables passing additional classpath as a file content (useful for Windows users with lots of classpath elements, disabled by default) + - `useClasspathFile` - enables passing additional classpath as a file content (useful for Windows users with lots of classpath elements, enabled by default) - `fileExtensionsToFilter` - provides ability to filter additional file extensions from PIT classpath (see [#53](https://github.com/szpak/gradle-pitest-plugin/issues/53)) For example: diff --git a/src/funcTest/resources/testProjects/junit5simple/build-pit-1.8-junit-platform-5.7.gradle b/src/funcTest/resources/testProjects/junit5simple/build-pit-1.8-junit-platform-5.7.gradle index e00629b8..765d36ef 100644 --- a/src/funcTest/resources/testProjects/junit5simple/build-pit-1.8-junit-platform-5.7.gradle +++ b/src/funcTest/resources/testProjects/junit5simple/build-pit-1.8-junit-platform-5.7.gradle @@ -34,6 +34,7 @@ test { } pitest { + useClasspathFile = false pitestVersion = "1.8.1" //PIT 1.9.0 required junit5PluginVersion 1.0.0+ which doesn't support older JUnit Platform 1.7 // testPlugin = "junit5" //not needed - 'junit5PluginVersion' should implicitly set it junit5PluginVersion = "0.14" diff --git a/src/funcTest/resources/testProjects/junit5simple/build.gradle b/src/funcTest/resources/testProjects/junit5simple/build.gradle index c9747f0e..3b934fed 100644 --- a/src/funcTest/resources/testProjects/junit5simple/build.gradle +++ b/src/funcTest/resources/testProjects/junit5simple/build.gradle @@ -29,6 +29,7 @@ test { } pitest { + useClasspathFile = false pitestVersion = "1.14.4" junit5PluginVersion = "1.2.0" //with no longer shaded junit-platform-launcher verbose = true //for "ClassNotFoundException: org.junit.platform.launcher.core.LauncherFactory" which should not happen diff --git a/src/funcTest/resources/testProjects/simple1/build.gradle b/src/funcTest/resources/testProjects/simple1/build.gradle index e43300a2..71144df9 100644 --- a/src/funcTest/resources/testProjects/simple1/build.gradle +++ b/src/funcTest/resources/testProjects/simple1/build.gradle @@ -21,3 +21,7 @@ group = "pitest.test" dependencies { testImplementation 'junit:junit:4.12' } + +pitest { + useClasspathFile = false +} diff --git a/src/main/groovy/info/solidsoft/gradle/pitest/PitestPlugin.groovy b/src/main/groovy/info/solidsoft/gradle/pitest/PitestPlugin.groovy index bafa28d8..89bdc3ac 100644 --- a/src/main/groovy/info/solidsoft/gradle/pitest/PitestPlugin.groovy +++ b/src/main/groovy/info/solidsoft/gradle/pitest/PitestPlugin.groovy @@ -114,7 +114,7 @@ class PitestPlugin implements Plugin { extension.testSourceSets.set([javaSourceSets.getByName(SourceSet.TEST_SOURCE_SET_NAME)]) extension.mainSourceSets.set([javaSourceSets.getByName(SourceSet.MAIN_SOURCE_SET_NAME)]) extension.fileExtensionsToFilter.set(DEFAULT_FILE_EXTENSIONS_TO_FILTER_FROM_CLASSPATH) - extension.useClasspathFile.set(false) + extension.useClasspathFile.set(true) extension.verbosity.set("NO_SPINNER") extension.addJUnitPlatformLauncher.set(true) } diff --git a/src/test/groovy/info/solidsoft/gradle/pitest/BasicProjectBuilderSpec.groovy b/src/test/groovy/info/solidsoft/gradle/pitest/BasicProjectBuilderSpec.groovy index e2da5bec..d09134d9 100644 --- a/src/test/groovy/info/solidsoft/gradle/pitest/BasicProjectBuilderSpec.groovy +++ b/src/test/groovy/info/solidsoft/gradle/pitest/BasicProjectBuilderSpec.groovy @@ -50,6 +50,7 @@ class BasicProjectBuilderSpec extends Specification { pitestConfig = project.getExtensions().getByType(PitestPluginExtension) project.group = 'test.group' + project.pitest.useClasspathFile = false } protected PitestTask getJustOnePitestTaskOrFail() {