{"id":15056584,"url":"https://github.com/szpak/gradle-pitest-plugin","last_synced_at":"2026-04-02T18:24:55.654Z","repository":{"id":3975249,"uuid":"5070403","full_name":"szpak/gradle-pitest-plugin","owner":"szpak","description":"Gradle plugin for PIT Mutation Testing","archived":false,"fork":false,"pushed_at":"2025-01-26T21:12:33.000Z","size":1861,"stargazers_count":227,"open_issues_count":55,"forks_count":60,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-01T04:53:20.640Z","etag":null,"topics":["code-quality","coverage","gradle","gradle-plugin","groovy","java","mutation-testing","pit","pitest","static-analysis","testing"],"latest_commit_sha":null,"homepage":"http://gradle-pitest-plugin.solidsoft.info/","language":"Groovy","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/szpak.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-2.0.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-07-16T16:57:24.000Z","updated_at":"2025-03-07T14:57:59.000Z","dependencies_parsed_at":"2023-01-14T11:17:34.890Z","dependency_job_id":"e68b7d95-78d9-43d7-9bfb-bf4ca728d5c9","html_url":"https://github.com/szpak/gradle-pitest-plugin","commit_stats":{"total_commits":694,"total_committers":32,"mean_commits":21.6875,"dds":"0.25648414985590773","last_synced_commit":"c97fe8a7575674681badf5489712973effecd6a0"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szpak%2Fgradle-pitest-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szpak%2Fgradle-pitest-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szpak%2Fgradle-pitest-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szpak%2Fgradle-pitest-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/szpak","download_url":"https://codeload.github.com/szpak/gradle-pitest-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247792892,"owners_count":20996891,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-quality","coverage","gradle","gradle-plugin","groovy","java","mutation-testing","pit","pitest","static-analysis","testing"],"created_at":"2024-09-24T21:53:43.784Z","updated_at":"2026-04-02T18:24:55.628Z","avatar_url":"https://github.com/szpak.png","language":"Groovy","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gradle plugin for PIT Mutation Testing\n\nThe plugin provides an ability to perform a [mutation testing](https://en.wikipedia.org/wiki/Mutation_testing) and\ncalculate a mutation coverage of a [Gradle](https://gradle.org/)-based projects with [PIT](http://pitest.org/).\n\n![Maven Central](https://img.shields.io/maven-central/v/info.solidsoft.gradle.pitest/gradle-pitest-plugin)\n[![Gradle Plugin Portal Version](https://img.shields.io/gradle-plugin-portal/v/info.solidsoft.pitest)](https://plugins.gradle.org/plugin/info.solidsoft.pitest)\n[![Build Status Travis](https://app.travis-ci.com/szpak/gradle-pitest-plugin.svg?branch=master)](https://app.travis-ci.com/szpak/gradle-pitest-plugin)\n[![Windows Build Status](https://img.shields.io/appveyor/build/szpak/gradle-pitest-plugin/master.svg?label=Windows%20build)](https://ci.appveyor.com/project/szpak/gradle-pitest-plugin)\n\n## Quick start\n\n### The simplest way\n\nAdd gradle-pitest-plugin to the `plugins` configuration in your `build.gradle` file:\n\n```groovy\nplugins {\n    id 'java' //or 'java-library' - depending on your needs\n    id 'info.solidsoft.pitest' version '1.19.0'\n}\n```\n\n\u003cdetails\u003e\n\u003csummary\u003ewith Kotlin DSL\u003c/summary\u003e\n\n```kotlin\nplugins {\n    id(\"java\") //or \"java-library\" - depending on your needs\n    id(\"info.solidsoft.pitest\") version \"1.19.0\"\n}\n```\n\u003c/details\u003e\n\nCall Gradle with pitest task:\n\n    gradle pitest\n\nAfter the measurements a report created by PIT will be placed in `${PROJECT_DIR}/build/reports/pitest` directory.\n\nOptionally make it depend on build:\n\n```groovy\nbuild.dependsOn 'pitest'\n```\n\n\u003cdetails\u003e\n\u003csummary\u003ewith Kotlin DSL\u003c/summary\u003e\n\n```kotlin\ntasks.build {\n    dependsOn(\"pitest\")\n}\n```\n\u003c/details\u003e\n\nNote that when making `pitest` depend on another task, it must be referred to by name. Otherwise, Gradle will resolve `pitest` to the configuration and not the task.\n\n### Generic approach\n\n\"The `plugins` way\" has some limitations. As the primary repository for the plugin is the [Central Repository](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22info.solidsoft.gradle.pitest%22%20AND%20a%3A%22gradle-pitest-plugin%22) (aka Maven Central) it is also possible to add the plugin to your project using \"the generic way\":\n\n```groovy\nbuildscript {\n    repositories {\n        mavenCentral()\n        //Needed only for SNAPSHOT versions\n        //maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }\n    }\n    dependencies {\n        classpath 'info.solidsoft.gradle.pitest:gradle-pitest-plugin:1.19.0'\n    }\n}\n```\n\n\u003cdetails\u003e\n\u003csummary\u003ewith Kotlin DSL\u003c/summary\u003e\n\n```kotlin\nbuildscript {\n    repositories {\n        mavenCentral()\n        //Needed only for SNAPSHOT versions\n        //maven {\n        //    url = uri(\"https://oss.sonatype.org/content/repositories/snapshots/\")\n        //}\n    }\n    dependencies {\n        classpath(\"info.solidsoft.gradle.pitest:gradle-pitest-plugin:1.19.0\")\n    }\n}\n```\n\u003c/details\u003e\n\nApply the plugin:\n\n```groovy\napply plugin: 'java' //or 'java-library' - depending on your needs\napply plugin: 'info.solidsoft.pitest'\n```\n\n\u003cdetails\u003e\n\u003csummary\u003ewith Kotlin DSL\u003c/summary\u003e\n\n```kotlin\napply(plugin = \"java\") //or \"java-library\" - depending on your needs\napply(plugin = \"info.solidsoft.pitest\")\n```\n\u003c/details\u003e\n\n\n## Plugin configuration\n\nThe Pitest plugin does not need to be additionally configured if you use JUnit 4. Customization is done in the `pitest` block:\n\n\n```groovy\npitest {\n    targetClasses = ['our.base.package.*']  //by default \"${project.group}.*\"\n    pitestVersion = '1.22.1' //not needed when a default PIT version should be used\n    threads = 4\n    outputFormats = ['XML', 'HTML']\n    timestampedReports = false\n}\n```\n\n\u003cdetails\u003e\n\u003csummary\u003ewith Kotlin DSL\u003c/summary\u003e\n\nIdiomatic and more portable configuration:\n```kotlin\npitest {\n    targetClasses.set(setOf(\"our.base.package.*\")) //by default \"${project.group}.*\"\n    pitestVersion.set(\"1.22.1\") //not needed when a default PIT version should be used\n    threads.set(4)\n    outputFormats.set(setOf(\"XML\", \"HTML\"))\n    timestampedReports.set(false)\n}\n```\n\nStarting from **Gradle 8.1** [simple property assignment](https://docs.gradle.org/8.4/release-notes.html#simple-property-assignment-in-kotlin-dsl-is-now-stable)\ncan be used for configuring plugin (instead of the `set()` method):\n```kotlin\npitest {\n    targetClasses = setOf(\"our.base.package.*\") //by default \"${project.group}.*\"\n    pitestVersion = \"1.22.1\" //not needed when a default PIT version should be used\n    threads = 4\n    outputFormats = setOf(\"XML\", \"HTML\")\n    timestampedReports = false\n}\n```\n\u003c/details\u003e\n\nThe configuration in Gradle is the real Groovy code which makes all assignments very intuitive. All values expected by\nPIT should be passed as a corresponding types. There is only one important difference. For the parameters where PIT expects\na coma separated list of strings in a Gradle configuration a list of strings should be used (see `outputFormats` in the\nexample above).\n\nCheck PIT documentation for a [list](https://pitest.org/quickstart/commandline/) of all available command line parameters.\nThe expected parameter format in a plugin configuration can be taken from\n[PitestPluginExtension](https://github.com/szpak/gradle-pitest-plugin/blob/master/src/main/groovy/info/solidsoft/gradle/pitest/PitestPluginExtension.groovy).\n\nTo make life easier `taskClasspath`, `mutableCodePaths`, `sourceDirs`, `reportDir`, `verbosity` and `pitestVersion` are\nautomatically set by the plugin. In addition `sourceDirs`, `reportDir`, `verbosity` and `pitestVersion` can be overridden by a user.\n\nThere are a few parameters specific for Gradle plugin:\n\n - `testSourceSets` - defines test source sets which should be used by PIT (by default sourceSets.test, but allows\nto add integration tests located in a different source set)\n - `mainSourceSets` - defines main source sets which should be used by PIT (by default sourceSets.main)\n - `mainProcessJvmArgs` - JVM arguments to be used when launching the main PIT process; make a note that PIT itself launches\nanother Java processes for mutation testing execution and usually `jvmArgs` should be used to for example increase maximum memory size\n(see [#7](https://github.com/szpak/gradle-pitest-plugin/issues/7));\n - `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))\n - `useClasspathFile` - enables passing additional classpath as a file content (useful for Windows users with lots of classpath elements, enabled by default)\n - `fileExtensionsToFilter` - provides ability to filter additional file extensions from PIT classpath (see [#53](https://github.com/szpak/gradle-pitest-plugin/issues/53))\n\nFor example:\n\n```groovy\npitest {\n    ...\n    testSourceSets = [sourceSets.test, sourceSets.integrationTest]\n    mainSourceSets = [sourceSets.main, sourceSets.additionalMain]\n    jvmArgs = ['-Xmx1024m']\n    useClasspathFile = true     //useful with bigger projects on Windows, enabled by default\n    fileExtensionsToFilter.addAll('xml', 'orbit')\n}\n```\n\n\u003cdetails\u003e\n\u003csummary\u003ewith Kotlin DSL\u003c/summary\u003e\n\n```kotlin\npitest {\n    ...\n    testSourceSets.set(listOf(sourceSets.test.get(), sourceSets.getByName(\"integrationTest\")))\n    mainSourceSets.set(listOf(sourceSets.main.get(), sourceSets.getByName(\"additionalMain\")))\n    jvmArgs.set(listOf(\"-Xmx1024m\"))\n    useClasspathFile.set(true) //useful with bigger projects on Windows, enabled by default\n    fileExtensionsToFilter.addAll(\"xml\", \"orbit\")\n}\n```\n\u003c/details\u003e\n\n### Test system properties\n\nPIT executes tests in a JVM independent of the JVM used by Gradle to execute tests. If your tests require some system properties, you have to pass them to PIT as the plugin won't do it for you:\n\n```groovy\ntest {\n    systemProperty 'spring.test.constructor.autowire.mode', 'all'\n}\n\npitest {\n    jvmArgs = ['-Dspring.test.constructor.autowire.mode=all']\n}\n```\n\n\u003cdetails\u003e\n\u003csummary\u003ewith Kotlin DSL\u003c/summary\u003e\n\n```kotlin\ntasks.test {\n    systemProperty(\"spring.test.constructor.autowire.mode\", \"all\")\n}\n\npitest {\n    jvmArgs.set(listOf(\"-Dspring.test.constructor.autowire.mode=all\"))\n}\n```\n\u003c/details\u003e\n\n### Eliminate warning in IDEA (Groovy-only)\n\nAs reported in [#170](https://github.com/szpak/gradle-pitest-plugin/pull/170) IntelliJ IDEA displays warnings about setting final fields (of [lazy configuration](https://docs.gradle.org/current/userguide/lazy_configuration.html)) in `build.gradle`.\nIt is not a real problem as Gradle internally intercepts those calls and use a setter instead.\nNevertheless, people which prefer to have no (less) warnings at the cost of less readable code can use setters instead, e.g:\n\n```groovy\n    testSourceSets.set([sourceSets.test, sourceSets.integrationTest])\n    mainSourceSets.set([sourceSets.main, sourceSets.additionalMain])\n    jvmArgs.set(['-Xmx1024m'])\n    useClasspathFile.set(true)     //useful with bigger projects on Windows\n    fileExtensionsToFilter.addAll('xml', 'orbit')\n```\n\n## Multi-module projects support\n\ngradle-pitest-plugin can be used in [multi-module projects](src/funcTest/resources/testProjects/multiproject/build.gradle).\nThe gradle-pitest-plugin dependency should be added to the buildscript configuration in the root project while the plugin has to be applied in\nall subprojects which should be processed with PIT. A sample snippet from build.gradle located for the root project:\n\n```groovy\n//in root project configuration\nplugins {\n    id 'info.solidsoft.pitest' version '1.19.0' apply false\n}\n\nsubprojects {\n    apply plugin: 'java'\n    apply plugin: 'info.solidsoft.pitest'\n\n    pitest {\n        threads = 4\n\n        if (project.name in ['module-without-any-test']) {\n            failWhenNoMutations = false\n        }\n    }\n}\n```\n\n\u003cdetails\u003e\n\u003csummary\u003ewith Kotlin DSL\u003c/summary\u003e\n\n```kotlin\n//in root project configuration\nplugins {\n    id(\"info.solidsoft.pitest\") version \"1.19.0\"\n}\n\nsubprojects {\n    apply(plugin = \"java\")\n    apply(plugin = \"info.solidsoft.pitest\")\n\n    pitest {\n        threads.set(4)\n\n        if (project.name in setOf(\"module-without-any-test\")) {\n            failWhenNoMutations.set(false)\n        }\n    }\n}\n```\n\u003c/details\u003e\n\nIt is possible to aggregate pitest report for multi-module project using plugin `info.solidsoft.pitest.aggregator` and\ntask `pitestReportAggregate`. Root project must be properly configured to use `pitestReportAggregate` :\n\n\n```groovy\n//in root project configuration\nplugins {\n    id 'info.solidsoft.pitest' version '1.19.0' apply false\n}\n\napply plugin: 'info.solidsoft.pitest.aggregator' // to 'pitestReportAggregate' appear\n\nsubprojects {\n    apply plugin: 'java'\n    apply plugin: 'info.solidsoft.pitest'\n\n    pitest {\n        // export mutations.xml and line coverage for aggregation\n        outputFormats = [\"XML\"]\n        exportLineCoverage = true\n        timestampedReports = false\n        ...\n        reportAggregator {  //since 1.9.11 - extra results validation, if needed\n            testStrengthThreshold.set(50)   //simpler Groovy syntax (testStrengthThreshold = 50) does not seem to be supported for nested properties\n            mutationThreshold.set(40)\n            maxSurviving.set(3)\n        }\n    }\n}\n```\n\n\u003cdetails\u003e\n\u003csummary\u003ewith Kotlin DSL\u003c/summary\u003e\n\n```kotlin\n//in root project configuration\nplugins {\n    id(\"info.solidsoft.pitest\") version \"1.19.0\"\n}\napply(plugin = \"info.solidsoft.pitest.aggregator\")\n\nsubprojects {\n    apply(plugin = \"java\")\n    apply(plugin = \"info.solidsoft.pitest\")\n\n    pitest {\n        outputFormats.set(setOf(\"XML\"))\n        timestampedReports.set(false)\n        exportLineCoverage.set(true)\n        ...\n        reportAggregator {\n            testStrengthThreshold.set(50)\n            mutationThreshold.set(40)\n            maxSurviving.set(3)\n        }\n    }\n}\n```\n\u003c/details\u003e\n\nAfter the `pitest pitestReportAggregate` tasks execution, the aggregated report will be placed in the `${PROJECT_DIR}/build/reports/pitest` directory.\n\n## Integration tests in separate subproject\n\nIt is possible to mutate code located in different subproject. Gradle internally does not rely on\noutput directory from other subproject, but builds JAR and uses classes from it. For PIT those are two different sets of class files, so\nto make it work it is required to define both `mainSourceSets` and `additionalMutableCodePaths`. For example:\n\n```groovy\nconfigure(project(':itest')) {\n    apply plugin: 'info.solidsoft.pitest'\n    dependencies {\n        implementation project(':shared')\n    }\n\n    configurations { mutableCodeBase { transitive false } }\n    dependencies { mutableCodeBase project(':shared') }\n    pitest {\n        mainSourceSets = [project.sourceSets.main, project(':shared').sourceSets.main]\n        additionalMutableCodePaths = [configurations.mutableCodeBase.singleFile]\n    }\n}\n```\n\n\u003cdetails\u003e\n\u003csummary\u003ewith Kotlin DSL\u003c/summary\u003e\n\n```kotlin\nconfigure(listOf(project(\":itest\"))) {\n    apply(plugin = \"info.solidsoft.pitest\")\n    dependencies {\n        implementation(project(\":shared\"))\n    }\n\n    val mutableCodeBase by configurations.creating { isTransitive = false }\n    dependencies { mutableCodeBase(project(\":shared\")) }\n    pitest {\n        mainSourceSets.set(listOf(project.sourceSets.main.get(), project(\":shared\").sourceSets.main.get()))\n        additionalMutableCodePaths.set(listOf(mutableCodeBase.singleFile))\n    }\n}\n```\n\u003c/details\u003e\n\nThe above is the way recommended by the [Gradle team](http://forums.gradle.org/gradle/topics/how-to-get-file-path-to-binary-jar-produced-by-subproject#reply_15315782),\nbut in specific cases the simpler solution should also work:\n\n```groovy\nconfigure(project(':itest')) {\n    apply plugin: 'info.solidsoft.pitest'\n    dependencies {\n        implementation project(':shared')\n    }\n\n    pitest {\n        mainSourceSets = [project.sourceSets.main, project(':shared').sourceSets.main]\n        additionalMutableCodePaths = project(':shared').jar.outputs.files.getFiles()\n    }\n}\n```\n\n\u003cdetails\u003e\n\u003csummary\u003ewith Kotlin DSL\u003c/summary\u003e\n\n```kotlin\nconfigure(listOf(project(\":itest\"))) {\n    apply(plugin = \"info.solidsoft.pitest\")\n    dependencies {\n        implementation(project(\":shared\"))\n    }\n\n    pitest {\n        mainSourceSets.set(listOf(project.sourceSets.main.get(), project(\":shared\").sourceSets.main.get()))\n        additionalMutableCodePaths.set(project(\":shared\").task(\"jar\").outputs.files)\n    }\n}\n```\n\u003c/details\u003e\n\nMinimal working multi-project build is available in\n[functional tests suite](https://github.com/szpak/gradle-pitest-plugin/tree/master/src/funcTest/resources/testProjects/multiproject).\n\n## PIT test-plugins support\n\nTest plugins are used to support different test frameworks than JUnit4.\n\n### JUnit 5 plugin for PIT support (gradle-pitest-plugin 1.4.7+)\n\nStarting with this release the configuration required to use PIT with JUnit 5 has been simplified to the following:\n\n```groovy\nplugins {\n    id 'java'\n    id 'info.solidsoft.pitest' version '1.19.0'\n}\n\npitest {\n    //adds dependency to org.pitest:pitest-junit5-plugin and sets \"testPlugin\" to \"junit5\"\n    junit5PluginVersion = '1.0.0'    //or 0.15 for PIT \u003c1.9.0\n    // ...\n}\n```\n\n\u003cdetails\u003e\n\u003csummary\u003ewith Kotlin DSL\u003c/summary\u003e\n\n```kotlin\nplugins {\n    id(\"java\")\n    id(\"info.solidsoft.pitest\") version \"1.19.0\"\n}\n\npitest {\n    // adds dependency to org.pitest:pitest-junit5-plugin and sets \"testPlugin\" to \"junit5\"\n    junit5PluginVersion.set(\"1.0.0\")\n}\n```\n\u003c/details\u003e\n\n**Please note**. PIT 1.9.0 requires pitest-junit5-plugin 1.0.0+. JUnit Jupiter 5.8 (JUnit Platform 1.8) requires pitest-junit5-plugin 0.15+, while 5.7 (1.7) requires 0.14. Set right plugin version for JUnit 5 version used in your project to avoid runtime errors (such as [`NoSuchMethodError: 'java.util.Optional org.junit.platform.commons.util.AnnotationUtils.findAnnotation(java.lang.Class, java.lang.Class, boolean)'](https://github.com/szpak/gradle-pitest-plugin/issues/300))).\n\nThe minimal working example for JUnit 5 is available in the [functional tests suite](https://github.com/szpak/gradle-pitest-plugin/blob/master/src/funcTest/resources/testProjects/junit5simple/build.gradle).\n\nFor mixing JUnit 5 with other PIT plugins, you can read [this section](https://blog.solidsoft.pl/2020/02/27/pit-junit-5-and-gradle-with-just-one-extra-line-of-configuration/#modern-approach-with-plugins-br-with-older-gradle-pitest-plugin) in my blog post.\n\n### Generic plugin support (also JUnit 5 in gradle-pitest-plugin \u003c1.4.7)\n\nTo enable PIT plugins, it is enough to add it to the pitest configuration in the buildscript closure. For example:\n\n```groovy\nplugins {\n    id 'java'\n    id 'info.solidsoft.pitest' version '1.19.0'\n}\n\nrepositories {\n    mavenCentral()\n}\n\ndependencies {\n    pitest 'org.example.pit.plugins:pitest-custom-plugin:0.42'\n}\n```\n\n\u003cdetails\u003e\n\u003csummary\u003ewith Kotlin DSL\u003c/summary\u003e\n\n```kotlin\nplugins {\n    id(\"java\")\n    id(\"info.solidsoft.pitest\") version \"1.19.0\"\n}\n\nrepositories {\n    mavenCentral()\n}\n\ndependencies {\n    pitest(\"org.example.pit.plugins:pitest-custom-plugin:0.42\")\n}\n```\n\u003c/details\u003e\n\nThe minimal working example is available in the [functional tests suite](https://github.com/szpak/gradle-pitest-plugin/blob/master/src/funcTest/groovy/info/solidsoft/gradle/pitest/functional/PitestPluginFunctional1Spec.groovy#L69-91).\n\nPlease note. In gradle-pitest-plugin \u003c1.5.0 the `pitest` configuration had to be created in the `buildscript` scope for the root project.\nPlease note. Starting with PIT 1.6.7 it is no longer needed to set `testPlugin` configuration parameter. It is also deprecated in the Gradle plugin.\n\n## Versions\n\nEvery gradle-pitest-plugin version by default uses a predefined PIT version. Usually this the latest released version\nof PIT available at the time of releasing a plugin version. It can be overridden by using `pitestVersion` parameter\nin a `pitest` configuration closure.\n\nPlease be aware that in some cases there could be some issues when using non default PIT versions.\n\nIf not stated otherwise, gradle-pitest-plugin 1.9.x by default uses PIT 1.9.x, 1.7.x uses PIT 1.7.x, etc. The minimal supported PIT version is 1.7.1.\n\nStarting with version 1.7.0 gradle-pitest-plugin requires Gradle 6.4. The latest version with the Gradle 5.x (5.6+) support is 1.6.0.\nThe current version was automatically smoke tested with Gradle 6.4, 6.9.1 and 7.4.2 under Java 11.\nTests with Java 11+ are limited to the compatible versions of Gradle and PIT.\n\nThe experimental support for Java 17 can be tested with 1.7.0+.\n\nStarting with the version 1.3.0 the produced binaries [require](https://github.com/szpak/gradle-pitest-plugin/issues/70#issuecomment-360989155) Java 8\n(as a JDK used for running a Gradle build). However, having Java 17 LTS released in September 2021, starting with gradle-pitest-plugin 1.9.0, support for JDK \u003c11 is deprecated (see [#299](https://github.com/szpak/gradle-pitest-plugin/issues/299)).\n\nSee the [changelog file](https://github.com/szpak/gradle-pitest-plugin/blob/master/CHANGELOG.md) for more detailed list of changes in the plugin itself.\n\n\n## FAQ\n\n### How can I override plugin configuration from command line/system properties?\n\nGradle does not provide a built-in way to override plugin configuration via command line, but [gradle-override-plugin](https://github.com/nebula-plugins/gradle-override-plugin)\ncan be used to do that.\n\nAfter [applied](https://github.com/nebula-plugins/gradle-override-plugin) gradle-override-plugin in **your** project it is possible to do following:\n\n    ./gradlew pitest -Doverride.pitest.reportDir=build/pitReport -Doverride.pitest.threads=8\n\nNote. The mechanism should work fine for String and numeric properties, but there are limitations with support of\n[Lists/Sets/Maps](https://github.com/nebula-plugins/gradle-override-plugin/issues/3) and [Boolean values](https://github.com/nebula-plugins/gradle-override-plugin/issues/1).\n\nFor more information see project [web page](https://github.com/nebula-plugins/gradle-override-plugin).\n\n### How can I change PIT version from default to just released the newest one?\n\ngradle-pitest-plugin by default uses a corresponding PIT version (with the same number). The plugin is released only if there are internal changes or\nthere is a need to adjust to changes in newer PIT version. There is a dedicated mechanism to allow to use the latest PIT version (e.g, a bugfix release)\nor to downgrade PIT in case of detected issues. To override a default version it is enough to set `pitestVersion` property in the `pitest` configuration\nclosure.\n\n```groovy\npitest {\n    pitestVersion = '2.8.1-the.greatest.one'\n}\n```\n\n\u003cdetails\u003e\n\u003csummary\u003ewith Kotlin DSL\u003c/summary\u003e\n\n```kotlin\npitest {\n    pitestVersion.set(\"2.8.1-the.greatest.one\")\n}\n```\n\u003c/details\u003e\n\nIn case of errors detected when the latest available version of the plugin is used with newer PIT version please raise an [issue](https://github.com/szpak/gradle-pitest-plugin/issues).\n\n### How to disable placing PIT reports in time-based subfolders?\n\nPlacing PIT reports directly in `${PROJECT_DIR}/build/reports/pitest` can be enabled with `timestampedReports` configuration property:\n\n```groovy\npitest {\n    timestampedReports = false\n}\n```\n\n\u003cdetails\u003e\n\u003csummary\u003ewith Kotlin DSL\u003c/summary\u003e\n\n```kotlin\npitest {\n    timestampedReports.set(false)\n}\n```\n\u003c/details\u003e\n\n### How can I debug a gradle-pitest-plugin execution or a PIT process execution itself in a Gradle build?\n\nOccasionally, it may be useful to debug a gradle-pitest-plugin execution or a PIT execution itself (e.g. [NPE in PIT](https://github.com/hcoles/pitest/issues/345)) to provide sensible error report.\n\nThe gradle-pitest-plugin execution can be remotely debugged with adding `-Dorg.gradle.debug=true` to the command line.\n\nHowever, as PIT is started as a separate process to debug its execution the following arguments need to be added to the plugin configuration:\n\n```groovy\npitest {\n    mainProcessJvmArgs = ['-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005']\n}\n```\n\n\u003cdetails\u003e\n\u003csummary\u003ewith Kotlin DSL\u003c/summary\u003e\n\n```kotlin\npitest {\n    mainProcessJvmArgs.set(listOf(\"-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005\"))\n}\n```\n\u003c/details\u003e\n\n### Can I use gradle-pitest-plugin with my Android application?\n\nShort answer is: not directly. Due to some [incompatibilities](https://github.com/szpak/gradle-pitest-plugin/issues/31) between \"standard\" Java applications and Android Java applications in Gradle the plugin does not support the later. Luckily, there is an Android [fork](https://github.com/koral--/gradle-pitest-plugin/) of the plugin maintained by [Karol Wrótniak](https://github.com/koral--) which provides a modified version supporting Android applications (but on the other hand it doesn't work with standard Java applications).\n\n### I have JUnit 5 plugin and the execution fails after migration to 1.5.0+, why?\n\ngradle-pitest plugin [1.5.0](https://github.com/szpak/gradle-pitest-plugin/releases/tag/release%2F1.5.0) finally relaxed the way how (where) the `pitest` configuration has been placed ([#62](https://github.com/szpak/gradle-pitest-plugin/issues/62)) which also was generating deprecation warnings in Gradle 6+. This change is not backward compatible and as a result manual migration has to be made - see the [release notes](https://github.com/szpak/gradle-pitest-plugin/releases/tag/release%2F1.5.0). This affects only project with external custom plugins.\n\n**Important**. As the JUnit 5 plugin for PIT is definitely the most popular, starting with 1.4.7 there is a simplified way how it could be configured with `junit5PluginVersion` (which is definitely **recommended**). See [my blog post](https://blog.solidsoft.pl/2020/02/27/pit-junit-5-and-gradle-with-just-one-extra-line-of-configuration/#modern-improved-approach-with-plugins-br-and-gradle-pitest-plugin-147) to find out how to migrate (it also solves the compatibility issue with 1.5.0+).\n\n\n## Known issues\n\n - too verbose output from PIT (also see `verbosity` option introduced with PIT 1.7.1)\n\n## Development\n\ngradle-pitest-plugin cloned from the repository can be built using Gradle command:\n\n    ./gradlew build\n\nThe easiest way to make a JAR with local changes visible in another project is to install it into the local Maven repository:\n\n    ./gradlew install\n\nThere are also basic functional tests written using [nebula-test](https://github.com/nebula-plugins/nebula-test/) which can be run with:\n\n    ./gradlew funcTest\n\n\n## Support\n\n[gradle-pitest-plugin](https://gradle-pitest-plugin.solidsoft.info/) has been written by Marcin Zajączkowski with a help from [contributors](https://github.com/szpak/gradle-pitest-plugin/graphs/contributors).\nThe author can be contacted directly via email: mszpak ATT wp DOTT pl.\nThere is also Marcin's blog available: [Solid Soft](https://blog.solidsoft.pl) - Working code is not enough.\n\nThe plugin surely has some bugs and missing features. They can be reported using an [issue tracker](https://github.com/szpak/gradle-pitest-plugin/issues).\nHowever, it is often a better idea to send a questions to the [PIT mailing list](https://groups.google.com/group/pitusers) first.\n\nThe plugin is licensed under the terms of [the Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt).\n\n![Stat Counter stats](https://c.statcounter.com/9394072/0/db9b06ab/0/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fszpak%2Fgradle-pitest-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fszpak%2Fgradle-pitest-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fszpak%2Fgradle-pitest-plugin/lists"}