Jea*_*ôté 6 gradle gradle-plugin openapi openapi-generator
我目前正在使用 OpenApiGenerator 插件更新 gradle 项目。我更新了 gradle 版本 (v7.0) 和 OpenApiGenerator 插件版本 (5.1.0)。
当我尝试构建时,我收到这条奇怪的消息:
Some problems were found with the configuration of task ':api:openApiValidate' (type 'ValidateTask').
- Type 'ValidateTask' property 'inputSpec' of mutable type 'org.gradle.api.provider.Property' is writable.
Run Code Online (Sandbox Code Playgroud)
这是脚本:
apply plugin: 'org.openapi.generator'
description = """OpenApi API Validator"""
def openApiInput = file(tasks.getByName('processResources').outputs.files.singleFile.absolutePath + "\\openapi.yml")
openApiValidate {
inputSpec = openApiInput.path
}
tasks.findByName('openApiValidate').inputs.files openApiInput
tasks.findByName('openApiValidate').outputs.dir project.buildDir
tasks.findByName('openApiValidate').dependsOn 'processResources'
classes.dependsOn 'openApiValidate'
tasks.findByName('openApiGenerate').enabled = false
Run Code Online (Sandbox Code Playgroud)
知道如何解决这个问题吗?谢谢!
| 归档时间: |
|
| 查看次数: |
166 次 |
| 最近记录: |