stevesaliman / gradle-cobertura-plugin

Gradle Cobertura Plugin
119 stars 50 forks source link

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

Open steve-solomon opened 3 years ago

steve-solomon commented 3 years ago

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")
}
chgans commented 3 years ago

Same issue here with version 4.0.0 and gradle 7.1

struckma commented 2 years ago

also here for 4.0.0 with Gradle 7.0

shaunek commented 2 years ago

Tried 4.0.0 with Gradle 7.4 as well, same error message.

jabrena commented 2 years ago

The same here:

gradle -version

------------------------------------------------------------
Gradle 7.4.1
------------------------------------------------------------

Build time:   2022-03-09 15:04:47 UTC
Revision:     36dc52588e09b4b72f2010bc07599e0ee0434e2e

Kotlin:       1.5.31
Groovy:       3.0.9
Ant:          Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM:          1.8.0_322 (Temurin 25.322-b06)
OS:           Mac OS X 10.16 x86_64
blue-hope commented 2 years ago

same here

❯ ./gradlew -version

------------------------------------------------------------
Gradle 7.2
------------------------------------------------------------

Build time:   2021-08-17 09:59:03 UTC
Revision:     a773786b58bb28710e3dc96c4d1a7063628952ad

Kotlin:       1.5.21
Groovy:       3.0.8
Ant:          Apache Ant(TM) version 1.10.9 compiled on September 27 2020
JVM:          1.8.0_275 (Private Build 25.275-b01)
OS:           Linux 4.19.128-microsoft-standard amd64
abanoubdev commented 2 years ago

Same here for Gradle V.7.1.2

DenisRumyantsev commented 2 years ago

@steve-solomon @abanoubdev could you write @internal and @nested instead of @internal and @nested using backtick (`) to avoid mentioning GitHub users?

AlexandreCassagne commented 9 months ago

Hi all, I am wondering if there is any plans to fix this? What is the status of the project?

gautamkriiest commented 8 months ago

Hi All, I am facing the similar issue once upgrade the gradle version from 7.3 to 7.6.2.. Do we have any solution for this?

Here is the detail:

vsachinv commented 3 months ago

Any solution on this?