Javadoc generation failed when using gradle in github actions

Hi All,
In our project, We are using Java with Gradle, and build is happening Successfully but when we use Javadoc Market Place action, the build is failing and we are getting the following errors.
I am adding my Javadoc code snippet here for your reference. I placed this code in Github Actions PR check file.

 publish:
    runs-on: ubuntu-latest
    steps:
      - name: Deploy JavaDoc 🚀
        uses: MathieuSoysal/Javadoc-publisher.yml@v2.4.0
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          javadoc-branch: poc-javadoc
          java-version: 11
          target-folder: javadoc 
          project: gradle

I’m facing the following errors.

* Where:
[940](https://github.com/tr/highq_service-workflow/actions/runs/5805852180/job/15737626764#step:2:952)Build file '/home/runner/work/highq_service-workflow/highq_service-workflow/build.gradle' line: 215
[941](https://github.com/tr/highq_service-workflow/actions/runs/5805852180/job/15737626764#step:2:953)
[942](https://github.com/tr/highq_service-workflow/actions/runs/5805852180/job/15737626764#step:2:954)* What went wrong:
[943](https://github.com/tr/highq_service-workflow/actions/runs/5805852180/job/15737626764#step:2:955)A problem occurred evaluating root project 'highq_service-workflow'.
[944](https://github.com/tr/highq_service-workflow/actions/runs/5805852180/job/15737626764#step:2:956)> Could not find method enabled() for arguments [true] on Report xml of type org.gradle.api.reporting.internal.TaskGeneratedSingleFileReport.

Here is the code snippet where the above mentioned error is showing line no-215.

reports {
    		xml.enabled true
    		csv.enabled false
    		html.enabled true
    	}

The error says line 215 and your description 125, but I guess that is a typo in your description.
Can you please show more around the line or the whole build script?
What do you mean by “direct gradle commands”?
The screenshot seems to show JavaDoc generation of a different project than the error message above it.
That you there get errors is normal as your JavaDoc is not valid.

I have edited the post. Pls check.
I am using same project.

What action is it you are talking about?
That action is probably not using the Gradle wrapper to execute the build but using some other Gradle version your build is not compatible with, which is exactly the reason each and every project should have the wrapper and always the wrapper used to execute a build.

Which you seem to be fully aware of, just found your bug entry for that action.
Here you see it uses the Gradle version that happens to be on the PATH in the action runner instead of using the Gradle wrapper: https://github.com/MathieuSoysal/Javadoc-publisher.yml/blob/main/action.yml#L89-L92

I tried generating Javadoc by using Gradle wrapper.
I am sharing the code snippet which I used in Github actions.

Javadoc-Publish:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3.5.3
      - name: Deploy Javadoc
        run: |
          chmod +x gradlew
          ./gradlew javadoc

After using the above script, Gradle build failed because the errors mentioned below

As I said, those errors are expected, as your JavaDoc comments are bad.
The error output tells you exactly what you did wrong.

Can you please correct me with right commands

Your command is fine, your sources are broken regarding JavaDoc.