https://kotlinlang.org logo
#announcements
Title
# announcements
j

jlleitschuh

10/12/2017, 1:01 AM
This is a general wince why question, but has anyone been able to get IntelliJ to use the aspectj class weaver to weave kotlin bytecode? I have a gradle plugin that I'm working on that does it there. But various IntelliJ configurations I'm using don't seem to be weaving the kotlin class files. Here's the sample project incase anyone is feeling really generous with their time: https://github.com/JLLeitschuh/gradle-kotlin-aspectj-weaver
d

damian

10/12/2017, 1:03 AM
Hugo seemed to have no problem with it, last I tried: https://github.com/JakeWharton/hugo
j

jlleitschuh

10/12/2017, 1:06 AM
That works with Kotlin??
It looks like it only works with java code. Maybe I'm wrong though.
I'm able to get this to work fine in gradle works fine. Its when I'm running it in IntelliJ the problems arise.
j

jw

10/12/2017, 1:34 AM
I'm pretty sure it only works with Java. I haven't touched it in like 5 years
j

jlleitschuh

10/12/2017, 2:18 AM
And there's also this fine missing feature: https://youtrack.jetbrains.com/issue/KT-20745
d

damian

10/12/2017, 2:46 AM
Oh, I had gotten it to work in the past I think by using the transform API (Android)... I think there is/was a PR open that switched to that, and it worked with Kotlin
j

jw

10/12/2017, 3:29 AM
Oh true. The transform API works on bytecode regardless of what language it comes from so it should work
f

Fré Dumazy

10/12/2017, 11:29 AM
I've been using this aspectj plugin without any issues: https://github.com/Archinamon/GradleAspectJ-Android