Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing classpath in file by default #347

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
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 @@ -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
Expand Down
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 @@ -114,7 +114,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")
extension.addJUnitPlatformLauncher.set(true)
}
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