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

[BUG] Gradle 6.8 complains about outputDir property to be deprecated #8591

Open
vinkenfl opened this issue Feb 1, 2021 · 2 comments
Open

Comments

@vinkenfl
Copy link

vinkenfl commented Feb 1, 2021

This generate call done with gradle 6.8 and openapi-generator 5.0.0:

gradlew --warning-mode=all build

causes the following deprecation warning:

Querying the mapped value of task ':xxx:xxx:openApiGenerate' property 'outputDir' before task ':xxx:xxx:openApiGenerate' has completed has been deprecated. This will fail with an error in Gr
adle 7.0. Consult the upgrading guide for further information: https://docs.gradle.org/6.8/userguide/upgrading_version_6.html#querying_a_mapped_output_property_of_a_task_before_the_task_has_completed

This is the generate config for build.gradle

openApiGenerate {
    generatorName = "java"
    library = "resttemplate"
    inputSpec = "${projectDir}/src/main/swagger/Example.yaml"
    outputDir = "${projectDir}/src/generated/"
    apiPackage = "adapter.web.api"
    modelPackage = "adapter.web.model"
    generateApiDocumentation = false
    generateApiTests = false
    configOptions["java8"] = "true"
    configOptions["dateLibrary"] = "java8"
    globalProperties["models"] = ""
}

Currently the ist no way to avoid this message.

@vinkenfl vinkenfl changed the title [BUG] Gradle 6.7.1 complains about outputDir property to be deprecated [BUG] Gradle 6.8 complains about outputDir property to be deprecated Feb 1, 2021
@sergeykad
Copy link

As expected the plugin fails with Gradle 7.0-milestone-3. The following message is printed:

A problem was found with the configuration of task ':my-module:openApiGenerate' (type 'GenerateTask').
  - Type 'GenerateTask' property 'input' annotated with @Internal should not be also annotated with @Input.
    
    Reason: A property is ignored but also has input annotations.
    
    Possible solutions:
      1. Remove the input annotations.
      2. Remove the @Internal annotation.
    
    Please refer to https://docs.gradle.org/7.0-milestone-3/userguide/validation_problems.html#ignored_property_must_not_be_annotated for more details about this problem.

@mattea36
Copy link

There seems to be this PR #9059

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants