OpenAPITools / OpenAPITools/openapi-generator

[REQ] Add skipIfSpecIsUnchanged to the gradle plugin

Open
#16,662 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement: Feature
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Is your feature request related to a problem? Please describe.

I noticed that there is an option "skipIfSpecIsUnchanged" in the maven plugin which causes the plugin to skip
generating code if the source template has not changed. That option is not available in the gradle plugin.
It would be nice to have it there as well, to reduce build times.

Describe the solution you'd like

I think it would be possible to implement the same solution as in the maven plugin.
The java code needs to be somewhat adapted to kotlin, but i think it would be easy.
The way it works in the maven plugin is that hash files are generated which is then compared
during subsequent builds.

Describe alternatives you've considered

I guess i could always switch to maven.

Additional context

N/A

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing Maven plugin implementation of skipIfSpecIsUnchanged and the Gradle plugin code that generates source files. Compare how the Maven plugin creates and checks hash files, then adapt that behavior for Gradle and verify that unchanged specifications skip generation on subsequent builds.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, kotlin
Domain
build-system
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.