[英]How can I configuration spring-boot-configuration-processor when I would like to change from KAPT to KSP? I get every time error
Basic problem, kapt
is in maintenance mode.基本问题,
kapt
处于维护模式。 So I would like to change to ksp
.所以我想换成
ksp
。 In theory, it's the equivalent of faster like kapt.从理论上讲,它相当于像 kapt 一样更快。 The changing option is not clear.
更改选项不清楚。
I did:我做了:
This was这是
plugin {
...
kotlin("kapt") version "1.7.20"
...
replaced by取而代之
plugin {
...
id("com.google.devtools.ksp") version "1.7.20-1.0.7"
...
}
and there were还有
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
kapt("org.springframework.boot:spring-boot-configuration-processor")
replaced by取而代之
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
ksp("org.springframework.boot:spring-boot-configuration-processor")
So, when I build project I got below error:因此,当我构建项目时出现以下错误:
> Task :kspKotlin FAILED
e: [ksp] No providers found in processor classpath.
e: Error occurred in KSP, check log for detail
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':kspKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
> Compilation error. See log for more details
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================
* Get more help at https://help.gradle.org
BUILD FAILED in 829ms
1 actionable task: 1 executed
I've been mining the inte.net for almost two days, but I still haven't found a solution to this problem.我已经在 inte.net 上挖了快两天了,但我仍然没有找到解决这个问题的方法。 If anyone knows, I will be very happy: :)
如果有人知道,我会很高兴::)
KSP is not a direct replacement to kapt. KSP 不是 kapt 的直接替代品。 Changing one name to another won't do the trick.
将一个名字更改为另一个名字不会成功。
spring-boot-configuration-processor
wasn't built to work with KSP, so this line spring-boot-configuration-processor
不是为与 KSP 一起工作而构建的,所以这一行
ksp("org.springframework.boot:spring-boot-configuration-processor")
won't do anything.不会做任何事情。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.