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

Gradle plug-in no longer works w/o the :mergeDiktatReports task #1484

Closed
0x6675636b796f75676974687562 opened this issue Jul 29, 2022 · 0 comments · Fixed by #1487 or #1485
Closed

Gradle plug-in no longer works w/o the :mergeDiktatReports task #1484

0x6675636b796f75676974687562 opened this issue Jul 29, 2022 · 0 comments · Fixed by #1487 or #1485
Assignees
Labels
bug Something isn't working plugins Plugins for build systems to allow them to run diktat regression
Milestone

Comments

@0x6675636b796f75676974687562
Copy link
Member

As of version 1.2.2, the Gradle plug-in requires the :mergeDiktatReports task to be present, even for single-module projects.

This behaviour shouldn't apply in the following cases:

  • single-module projects;
  • projects where reporter is set to anything but sarif (e.g.: plain).

Observed behavior

C:\project> gradle --continue diktatCheck
FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':diktatCheck'.
> Could not create task ':mergeDiktatReports'.
   > Could not create task of type 'SarifReportMergeTask'.
      > Could not generate a decorated class for type SarifReportMergeTask.
         > kotlinx/serialization/SerializationException

* 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

BUILD FAILED in 1s

Steps to Reproduce

Try to run gradle diktatCheck or ./gradlew diktatCheck for either this template project, or any of the Gradle projects under examples/.

Environment information

@0x6675636b796f75676974687562 0x6675636b796f75676974687562 added bug Something isn't working regression labels Jul 29, 2022
@0x6675636b796f75676974687562 0x6675636b796f75676974687562 added this to the 1.2.3 milestone Jul 29, 2022
@0x6675636b796f75676974687562 0x6675636b796f75676974687562 added the plugins Plugins for build systems to allow them to run diktat label Jul 29, 2022
petertrr added a commit that referenced this issue Jul 29, 2022
…Task (#1485)

### What's done:
* Added missing dependency in `diktat-gradle-plugin/pom.xml`
* Fixed typo in logging

Part of #1484, fixes compilation of gradle scripts for projects that don't have `kotlinx-serialization-core` on their plugin classpath.
petertrr added a commit that referenced this issue Jul 29, 2022
### What's done:
* Root project might not have a task `mergeDiktatReports`

This pull request closes #1484
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working plugins Plugins for build systems to allow them to run diktat regression
Projects
None yet
2 participants