Skip to content

Task 'cobertura' fails with exception, v 4.0.0, gradle v 7.1.1, "GenerateReportTask' property 'reports' annotated with @Internal should not be also annotated with @Nested" #176

@steve-solomon

Description

@steve-solomon

Task 'cobertura' fails with exception, v 4.0.0, gradle v 7.1.1, "GenerateReportTask' property 'reports' annotated with @internal should not be also annotated with @nested" :

$ ./gradlew cobertura
> Task :lib:generateCoberturaReport FAILED

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':lib:generateCoberturaReport' (type 'GenerateReportTask').
  - In plugin 'net.saliman.cobertura' type 'net.saliman.gradle.plugin.cobertura.GenerateReportTask' property 'reports' annotated with @Internal should not be also annotated with @Nested.
    
    Reason: A property is ignored but also has input annotations.
    
    Possible solutions:
      1. Remove the input annotations.
      2. Remove the @Internal annotation.
    
    Please refer to https://docs.gradle.org/7.1.1/userguide/validation_problems.html#ignored_property_must_not_be_annotated for more details about this problem.

build.gradle:

plugins {
    // Apply the java-library plugin for API and implementation separation.
    id 'java-library'
    id 'net.saliman.cobertura' version '4.0.0'
}
...
cobertura {
    coverageReportDir = new File("$buildDir/reports/cobertura")
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions