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 plugin extension does not allow filesSuffixes to be set, and also returns the wrong value for generatedAnnotations. #5860

Closed
matteriben opened this issue Apr 3, 2024 · 3 comments · Fixed by #5844

Comments

@matteriben
Copy link
Contributor

matteriben commented Apr 3, 2024

Describe the bug

Gradle plugin extension for java-generator does not allow filesSuffixes to be set, and also returns the wrong value for generatedAnnotations.

Fabric8 Kubernetes Client version

SNAPSHOT

Steps to reproduce

javaGen {
    filesSuffixes = listOf(".yml") // Script compilation error
    generatedAnnotations = false
    if (generatedAnnotations) {
        throw RuntimeException() // throws exception
    }
}

Expected behavior

I expect to be able to set filesSuffixes and get generatedAnnotations from within the gradle build file.

Runtime

other (please specify in additional context)

Kubernetes API Server version

1.25.3@latest

Environment

Linux

Fabric8 Kubernetes Client Logs

No response

Additional context

I have a fix already, just created this issue to get an issue number for the changelog.
#5844

@andreaTP
Copy link
Member

andreaTP commented Apr 8, 2024

Look like a plain bug, @matteriben would you be up picking this up?
Or maybe we can summon @fabiobrz if he has a cycle to volunteer here 🙂

@fabiobrz
Copy link
Contributor

fabiobrz commented Apr 9, 2024

I can have a look, thanks for bringing this up!

@fabiobrz
Copy link
Contributor

fabiobrz commented Apr 9, 2024

I can have a look, thanks for bringing this up!

Hi @matteriben, @andreaTP - I didn't notice the issue was assigned already, and that a PR was linked.

I spotted the issue from my mobile and these "details" did not catch my eye... my bad.

I see that the PR @matteriben provided addresses the issue, but adds functionality as well.
So feel free to either:

  1. Use my PR for fixing the reported issue, and Support for javaType and existingJavaType extensions in java-generator #5844 to add functionality
  2. Discard and close [issue-5860] - Java generator: fix the Gradle plugin configuration #5871, and just keep Support for javaType and existingJavaType extensions in java-generator #5844

UPDATE - ok, I see more work has been done additionally in #5844, so this PR would just slow down the reviewing and merging the changes. Closing #5871, and sorry for the noise.

@manusa manusa added this to the 6.12.0 milestone Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment