构建 allure framework 易错的地方和解决方法

构建 allure framework 源码时遇到问题了,
Expression 'wrapper' cannot be invoked as a function. The function 'invoke()' is not found. Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
public val PluginDependenciesSpec.wrapper: PluginDependencySpec defined in org.gradle.kotlin.dsl.

tasks.wrapper {
gradleVersion = "8.1.1"
}

在build.gradle.kts 中wrapper 识别不出来,出现以上错误。构建的时候提示 版本不匹配的问题 :

com.diffplug.spotless 基于Java 11 构建***

最后降级了2个依赖,原版本:

id("com.bmuschko.docker-remote-api") version "9.3.3"
id("com.diffplug.spotless") version "6.22.0"

降级后版本:

id("com.bmuschko.docker-remote-api") version "6.0.0"
id("com.diffplug.spotless") version "6.1.0"

至此gradle clean assemble 成功

posted @ 2023-11-25 23:13  ahguo  阅读(33)  评论(0编辑  收藏  举报