OpenAPITools / OpenAPITools/openapi-generator

[REQ] Improve documentation for Gradle 8.0.2

Open
#15,095 2 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.

The Gradle documentation is outdated for Gradle 8.

Describe the solution you'd like

Update the documentation to use the lazy tasks.register api instead of the deprecated methods.

def generateModelsTask = tasks.register('generateModels', GenerateTask) {
    generatorName = "java"
    inputSpec = "<inputSpec>"
    outputDir = "<outputDir>"
    modelPackage = "<package>"
    generateModelTests = false
    globalProperties.putAll([
            // force only the models
            apis    : "false",
            invokers: "false",
    ])
    configOptions.putAll([
            library             : "native",
            serializationLibrary: "jackson",
            dateLibrary         : "java8",
            useJakartaEe        : "true",
    ])
}

compileJava.dependsOn generateModelsTask

Describe alternatives you've considered

/

Additional context

https://docs.gradle.org/current/userguide/more_about_tasks.html#sec:defining_tasks

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 with the linked Gradle documentation section and search the repository documentation for task definitions using deprecated methods. Update the relevant examples to use the lazy tasks.register API shown in the issue, then verify that the examples are appropriate for Gradle 8.0.2.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy, java
Domain
build-system, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.