Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 this issue Aug 5, 2021 · 10 comments

Comments

@steve-solomon
Copy 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" :

$ ./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
Copy link

chgans commented Sep 10, 2021

Same issue here with version 4.0.0 and gradle 7.1

@struckma
Copy link

also here for 4.0.0 with Gradle 7.0

@shaunek
Copy link

shaunek commented Feb 23, 2022

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

@jabrena
Copy link

jabrena commented Mar 23, 2022

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
Copy link

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
Copy link

Same here for Gradle V.7.1.2

SingingBush added a commit to SingingBush/gradle-cobertura-plugin that referenced this issue May 19, 2022
SingingBush added a commit to SingingBush/gradle-cobertura-plugin that referenced this issue May 19, 2022
@DenisRumyantsev
Copy link

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

@AlexandreCassagne
Copy link

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

@gautamkriiest
Copy link

gautamkriiest commented Feb 8, 2024

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
Copy link

Any solution on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests