:kotlin-intensifies-purple: Kotlin 2.1.20 is here!...
# announcements
a
K Kotlin 2.1.20 is here! K This release brings powerful new features and improvements: K2 support for kapt and Lombok plugins 🔗 Common atomic types and improved UUIDs in stdlib ⏱️ Native time-tracking API New inlining optimizations in Kotlin/Native 🛠️ Better debugging for Kotlin/Wasm 📜 A new DSL to replace Gradle’s Application plugin 📚 Big improvements to Kotlin documentation Learn more: https://kotl.in/2-1-2
thank you color 8
K 57
👍 8
kodee greetings 16
❤️ 36
kodee happy 69
d
Is there a place where I see the progress of K2 IDE support?
🙌 2
m
Weird, Slack unfurled the blog post, but I get a 404 if I click the link or the unfurl 🤔
1
f
e
Taking it for a spin. I have a project using Maven, but can’t seem to get the
-Xcontext-parameters
compiler arg to work. It works from the command line
mvn compile
, but not when building in IntelliJ. The error I get is that I must have context params enabled. Anyone else encounter and solve this?
d
Is there a guide how to add Kotlin last version to an existing Java project that has Lombok, so that everything compiles and runs as expected ? We have: Project with Java 17, maven, and Lombok We want: To add Kotlin, last version with K2 Test case: Run kotlin code that uses a Java POJO annotated with lombok @Builder / @Data etc Result builder: Unresolved reference 'builder'. Result use lombok setter: Cannot access 'field exportLabel: String!': it is private'.
t
@Dumitru Preguza check this link
👍 1
c
Can anyone expand on "Kotlin Multiplatform: A new DSL to replace Gradle’s Application plugin in multiplatform projects." isaw more details here but i still dont really get it/mpotivation to move to it https://kotlinlang.org/docs/whatsnew2120.html#kotlin-multiplatform-new-dsl-to-replace-gradle-s-application-plugin
t
basically it is a replacement for Gradle
application
plugin which will not work with KMP in projects using Gradle 8.7+
d
@tapchicoma for now I get:
[ERROR] 'build.plugins.plugin[org.jetbrains.kotlin:kotlin-maven-plugin].dependencies.dependency.scope' for org.projectlombok:lombok:jar must be one of [compile, runtime, system] but is 'provided'
I'm checking what I have done wrong
In the pom from this repo: https://github.com/kotlin-hands-on/kotlin-lombok-examples/blob/master/kotlin_lombok_maven/nokapt/pom.xml Only the 'kotlin-maven-lombok' is listed as plugin dependency, without org.projectlombok:lombok itself. Probably the documentation on the website should be updated, either by removing the lombok dependency from plugin declaration, or by changing it's scope to an existing one (compile, runtime, system) because 'provided' is not an acceptable scope for a Maven plugin dependency. It's a major issue for new comers, they will copy paste from official website this config and then think something like 'Oh It doesn't work, I don't want kotlin in my existing java project', however the issue is trivial.
thank you color 1
I would like to report another issue with kotlin lombok plugin if I have defaultPrivate config in my lombok.config file:
Copy code
lombok.fieldDefaults.defaultPrivate = false
then I get in kotlin this error when trying to get/set a field from a Java Dto annotated with @Getter and @Setter at class level:
Exception in thread "main" java.lang.IllegalAccessError: class MainKt tried to access private field MyDto.myField (MainKt and DnsMessage are in unnamed module of loader 'app')
I think it has something to do with the compiler, lombok will put private instead of default modifier
t
it would be nice if you could create a Kotlin issue for this: https://kotl.in/issue
👍 1