allure-framework / allure-gradle

Allure Gradle Plugin
Apache License 2.0
85 stars 36 forks source link

Plugin not working with Gradle 7.0 #60

Closed donbeave closed 3 years ago

donbeave commented 3 years ago

I'm submitting a ...

What is the current behavior?

../gradlew clean allureReport

> Task :tailrocks-payment-api-test:allureReport FAILED

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':tailrocks-payment-api-test:allureReport' (type 'AllureReport').
  - Type 'AllureReport' property 'clean' has redundant getters: 'getClean()' and 'isClean()'.

    Reason: Boolean property 'clean' has both an `is` and a `get` getter.

    Possible solutions:
      1. Remove one of the getters.
      2. Annotate one of the getters with @Internal.

    Please refer to https://docs.gradle.org/7.0/userguide/validation_problems.html#redundant_getters for more details about this problem.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/7.0/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 618ms
3 actionable tasks: 1 executed, 2 up-to-date

Please tell us about your environment:

Allure version 2.13.9
Test framework junit5
Generate report using allure-gradle@2.8.1
patrykks commented 3 years ago

This not the only problem. Plugin is using for example testCompile keyword which was removed in Gradle 7.0. Details: https://docs.gradle.org/7.0/userguide/upgrading_version_6.html#sec:configuration_removal

Is this project still supported/maintained? In few months this issue will be blocker for all users that would like to use Gradle in version >=7.0. Gradle in 7.0 brings important features such as support for Java 16 or native support for new generation of MAC processors.

patrykks commented 3 years ago

Are community contributions into this repository allowed? :)

vlsi commented 3 years ago

This PR adds Gradle 7.0 compatibility: https://github.com/allure-framework/allure-gradle/pull/61

Please feel free to try it and provide feedback

Ankhell commented 3 years ago

This not the only problem. Plugin is using for example testCompile keyword which was removed in Gradle 7.0. Details: https://docs.gradle.org/7.0/userguide/upgrading_version_6.html#sec:configuration_removal

Is this project still supported/maintained? In few months this issue will be blocker for all users that would like to use Gradle in version >=7.0. Gradle in 7.0 brings important features such as support for Java 16 or native support for new generation of MAC processors.

This one is not a blocker, actually, you can use

    allure {
        configuration = "testImplementation"
    }
Ankhell commented 3 years ago

This PR adds Gradle 7.0 compatibility: #61

Please feel free to try it and provide feedback

Unfortunately jitpack fails to build it :(

image Jitpack log

graddle.settings.kts config that I used

    resolutionStrategy {
        eachPlugin {
            if(requested.id.toString() == "io.qameta.allure")
                useModule("com.github.vlsi:allure-gradle:facelift-SNAPSHOT")
        }
    }
    repositories {
        mavenLocal()
        gradlePluginPortal()
        mavenCentral()
        jcenter()
        maven { setUrl("https://jitpack.io") }
    }
vlsi commented 3 years ago

Thanks. I've pushed a fix in https://github.com/allure-framework/allure-gradle/pull/61/commits/cb07f416f57eafc5cdb5c2dfe16bb7dfcff82bdc

cheparsky commented 3 years ago

Why did you downgrade Gradle to 6.9?

We use the last version of Gradle, will it be compatible and fix the problem?

ranamanas commented 3 years ago

I tried with Gradle 7.1.1 and i see the same error -

KroArtem commented 3 years ago

@vlsi , do you by accident know whether there are plans on releasing a new version?

martenhellmann commented 3 years ago

Could you please publish/build a new release from the current state. Last published release is from 2019. Thank you!

KroArtem commented 3 years ago

@baev , @eroshenkoam , currently this is a blocker to use gradle 7, is there any chance for new version?

pandoras-toolbox commented 3 years ago

We are also waiting for a bug fix. Or is there a workaround so that we can used Gradle 7 with Allure?

nareshiot commented 3 years ago

We have recently upgraded to Gradle 7 and with the above mentioned issue unable to generate the Allure report. Is there any release scheduled to resolve this issue? Or please suggest if there are any workaround to make it work with Gradle 7 version.

alexsirko commented 3 years ago

@baev @eroshenkoam Looks like a lot of people are anticipating a new release :) It would be very good to have at least a bit of backwards communication ;)

szczebel commented 3 years ago

+1 to bump up priority of Gradle 7.x support

mformetal commented 3 years ago

Any idea when this may happen? Would love to use AGP 7.0 in my project with this plugin.

admizh commented 3 years ago

summon nobody, seems like need create fork

KroArtem commented 3 years ago

During umoney meetup (https://youtu.be/s-cXhMcYwQM) @eroshenkoam said they'll have a look at this issue together with @baev but still no activity. It does look very impolite to promise something and do nothing, though 😞

eroshenkoam commented 3 years ago
Screenshot 2021-09-20 at 23 13 53

It's almost done)

eroshenkoam commented 3 years ago

Waiting for approval)

KroArtem commented 3 years ago

Nice to hear!

vlsi commented 3 years ago

Looks like the plugins have been approved for the Gradle Plugin Portal: https://plugins.gradle.org/search?term=io.qameta.allure

eroshenkoam commented 3 years ago
Screenshot 2021-09-23 at 13 12 58

Gradle miss allure-base plugin, to we need to wait until it will be approved.

Same commit's: https://github.com/allure-framework/allure-gradle/actions/runs/1254218491 https://github.com/allure-framework/allure-gradle/actions/runs/1265320157

But allure-base plugin missing in 2.9.0

eroshenkoam commented 3 years ago

ty, fixed in 2.9.3

davidmoshal commented 2 years ago

Problem still exists with Grade 7.2 Pity, the Node JS reporter works nicely. Guess it's not that well maintained?

vlsi commented 2 years ago

@davidmoshal , would you provide a reproducer? There are integration tests with Gradle 7.2: https://github.com/allure-framework/allure-gradle/blob/master/allure-plugin/src/test/kotlin/io/qameta/allure/gradle/report/TestAndAllureReportTest.kt#L41

suchitra-srinivasan commented 2 years ago

Some problems were found with the configuration of task ':allureAggregatedReport' (type 'AllureReport'). In plugin 'io.qameta.allure' type 'io.qameta.allure.gradle.task.AllureReport' property 'clean' has redundant getters: 'getClean()' and 'isClean()'.

Gradle version: 7.4.2. Seems like latest version of gradle has trouble generating allure report

zatolokinboris commented 2 years ago

Столкнулся с той же проблемой, при обновлении проекта командой разработки на 7.4.2 отвалился allure. Есть ли примерное понимания когда будет исправлена проблема?

vlsi commented 2 years ago

@zatolokinboris , давно исправлено уже. Какая у вас версия плагина?

zatolokinboris commented 2 years ago

А! Я ошибся с версией плагина самого аллюра! Вот оно что! Спасибо!

unickq commented 2 years ago

Gradle 7.4.2

plugins {
  id 'io.qameta.allure' version '2.10.0'
}

allure {
  version = '2.18.1'
}

./gradlew allureServe --info

Task :tests:allureServe NO-SOURCE
Skipping task ':tests:allureServe' as it has no source files and no previous output files.
:tests:allureServe (Thread[Execution worker for ':',5,main]) completed. Took 0.0 secs.
producer locations for task group 0 (Thread[Execution worker for ':',5,main]) started.
producer locations for task group 0 (Thread[Execution worker for ':',5,main]) completed. Took 0.0 secs.

Update from gradle 6. Missing source files?

vlsi commented 2 years ago

Have you tried ./gradlew allureServe --depends-on-tests?

@unickq , please do not add issues as comments to an old issue. It triggers excessive notifications.