Skip to content

Commit

Permalink
Passing classpath in file by default
Browse files Browse the repository at this point in the history
  • Loading branch information
sigee committed Jul 21, 2023
1 parent c97fe8a commit 8c7087a
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,6 @@ test {
}

pitest {
useClasspathFile = false
junit5PluginVersion = "1.0.0"
}
4 changes: 4 additions & 0 deletions src/funcTest/resources/testProjects/simple1/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ group = "pitest.test"
dependencies {
testImplementation 'junit:junit:4.12'
}

pitest {
useClasspathFile = false
}
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class PitestPlugin implements Plugin<Project> {
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")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class BasicProjectBuilderSpec extends Specification {
pitestConfig = project.getExtensions().getByType(PitestPluginExtension)

project.group = 'test.group'
project.pitest.useClasspathFile = false
}

protected PitestTask getJustOnePitestTaskOrFail() {
Expand Down

0 comments on commit 8c7087a

Please sign in to comment.