Hi there, I want to migrate a gradle project to Ko...
# arrow
p
Hi there, I want to migrate a gradle project to Kotlin 1.6. The project makes use of the optics dsl, which uses kapt, which does not support 1.6(?). My question is: Can I replace the kapt part somehow with ksp? I’m not that familiar with it (we only have kapt for the optics dsl in the project) and couldn’t find any hint in the docs. Any thoughts on this? Thanks in advance!
s
Hey @Philipp Mayer, We’re in the process of releasing it. You can already consume the 1.6.0-SNAPSHOT, and hopefully in next weeks we will be able to release. https://github.com/arrow-kt/Arrow-MPP-Template/compare/arrow-optics-plugin?expand=1
🎉 1
🙏 1
Like KSP this uses compiler pluigns
p
Thanks for the heads up @simon.vergauwen, I’ll look into that!
👍 1
t
I use
optics
with kotlin
1.6.0
, it works fine. I believe Kotlin 1.6.0 still supports
kapt
as usual
s
yes, it still supports
kapt
but of course still only for
jvm
.
t
ah, you meant KMM, I got it 😄
p
@thanh Okay, now I’m curious: Which kapt version are you using?
t
do you need to specify kapt version? something like
apply plugin: 'kotlin-kapt'
is enough I think.
j
kapt should use the same version as kotlin
p
Our setup looks like that:
Copy code
plugins {
    val kotlinVersion = "1.5.31"

    id("org.springframework.boot") version "2.5.1"
    id("io.spring.dependency-management") version "1.0.11.RELEASE"
    kotlin("jvm") version kotlinVersion
    kotlin("plugin.spring") version kotlinVersion
    kotlin("kapt") version kotlinVersion
}
changing the
kotlinVersion
to
1.6.0
will break the build as there is no version for kapt. Omitting the version will also not work.
t
ah, I think that's spring boot's issue
if you update springboot version
2.6.0
, it should work