gpt4 book ai didi

java - 更新到 Gradle 7.3,Java 17

转载 作者:行者123 更新时间:2023-12-05 05:47:48 30 4
gpt4 key购买 nike

我想将 gradle 从 5.6 更新到 7.3,但我做不到。我在编译项目期间遇到了这个问题(我有 java 17)。我读到 gradle >7 版本有一些问题,也许你知道哪里出了问题?感谢您的回答

这是使用 gradle 7.3 编译项目后的日志:

Some problems were found with the configuration of task ':api:TemplateServices-api:generateSwaggerCodeDocs' (type 'GenerateSwaggerCode').
- In plugin 'org.hidetake.swagger.generator' type 'org.hidetake.gradle.swagger.generator.GenerateSwaggerCode' property 'adaptorFactory' is missing an input or output annotation.

Reason: A property without annotation isn't considered during up-to-date checking.

Possible solutions:
1. Add an input or output annotation.
2. Mark it as @Internal.

Please refer to https://docs.gradle.org/7.3/userguide/validation_problems.html#missing_annotation for more details about this problem.
- In plugin 'org.hidetake.swagger.generator' type 'org.hidetake.gradle.swagger.generator.GenerateSwaggerCode' property 'configFile' is annotated with @InputFile but missing a normalization strategy.

Reason: If you don't declare the normalization, outputs can't be re-used between machines or locations on the same machine, therefore caching efficiency drops significantly.

Possible solution: Declare the normalization strategy by annotating the property with either @PathSensitive, @Classpath or @CompileClasspath.

Please refer to https://docs.gradle.org/7.3/userguide/validation_problems.html#missing_normalization_annotation for more details about this problem.
- In plugin 'org.hidetake.swagger.generator' type 'org.hidetake.gradle.swagger.generator.GenerateSwaggerCode' property 'wipeOutputDir' of type boolean shouldn't be annotated with @Optional.

Reason: Properties of primitive type cannot be optional.```

最佳答案

我解决了这个错误

如果你需要解决这个问题,你应该检查你的:

  • Lombok 版本
  • org.springframework.boot:spring-boot-gradle-plugi版本
  • 尝试添加 springfox-boot-starter 依赖项 (3.0.0)
  • 检查版本 io.springfox:springfox-swagger
  • org.openapitools:openapi-generator-gradle-plugin 版本
  • 检查 swagger 文件(.mustache 文件、gradle.build、版本)
  • 尝试将 org.gradle.jvmargs=--add-opens=java.util=ALL-UNNAMED 添加到 gradle 属性

关于java - 更新到 Gradle 7.3,Java 17,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70914097/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com