Skip to content

Plugin can't seem to recognize layout.buildDirectory.dir(...) paths #83

@edudar-chwy

Description

@edudar-chwy

I've configured the plugin using the Gradle-recommended way of referencing build resources:

sonar {
    properties {
        property("dc5.mutationAnalysis.pitest.sensor.reports.directory", layout.buildDirectory.dir("reports/pitest"))
    }
}

pitest {
    reportDir = layout.buildDirectory.dir("reports/pitest")
}

This results in report not found messages like

No report /Users/.../service/map(org.gradle.api.file.Directory property(org.gradle.api.file.Directory, fixed(class org.gradle.api.internal.file.DefaultFilePropertyFactory$FixedDirectory, /Users/.../service/build)) org.gradle.api.internal.file.DefaultFilePropertyFactory$PathToDirectoryTransformer@e8c5e04) found

Changing layout.buildDirectory.dir("reports/pitest") to file("build/reports/pitest") fixes this, and results appear in SonarQube UI. But that's not what Gradle recommends. It'd be good to support the layout.` directories.

A side note, given that finding a report is essential for the plugin to submit results, such messages should probably be WARN instead of DEBUG.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions