Closed fdaines closed 1 year ago
Could you try the other approach?
plugins {
id 'info.solidsoft.pitest' version '1.9.11'
}
Sure, I tried with this build.gradle
content and the output is the same (Task 'pitest' not found in root project 'my-project'.
).
plugins {
id "info.solidsoft.pitest" version "1.9.11"
}
Please make sure to apply also the java
plugin in your project (might be before or after the pitest plugin itself). pitest
is only for the Java projects and is only effectively applied (activated) then.
That's right @szpak , with this configuration my project can run pitest with gradle.
buildscript {
repositories {
mavenCentral()
//Needed only for SNAPSHOT versions
//maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
}
dependencies {
classpath 'info.solidsoft.gradle.pitest:gradle-pitest-plugin:1.9.11'
}
}
apply plugin: 'java-library'
apply plugin: 'info.solidsoft.pitest'
Maybe we can update the documentation with a suggestion to add this plugin if the pitest
task is not visible in Gradle.
Maybe we can update the documentation with a suggestion to add this plugin if the pitest task is not visible in Gradle.
Good idea. In fact, the following section about the multimodule projects already has it.
@fdaines Would you mind providing a PR adding the following lines:
id 'java' //or 'java-library' - depending on your needs
and:
apply plugin: 'java' //or 'java-library' - depending on your needs
respectively before the pitest plugin in the Quick start section?
Closing as @fdaines improved documentation in #331. Thanks!
Hello there, I'm having some issues trying to run
pitest
with Gradle, after following your instructions I can't see a task forpitest
and having an error when trying to run it.This is my
build.gradle
file:This is the output when I listed the gradle tasks:
And finally, this is the error when I run the
./gradlew pitest
command:The stacktrace shows this exception:
Environment Information
Gradle Version:
Java Version: