Looks that I’ve found critical bug in Kapt 1.2.20....
# kapt
g
Looks that I’ve found critical bug in Kapt 1.2.20. It doesn’t work with classes with
$
sign. @yan Could you please take a look? Not sure that my analysis is correct, but I will try to prepare sample project. We really want migrate to 1.2.20 but it’s blocker for us. https://youtrack.jetbrains.com/issue/KT-22493
y
Thank you, I will look into this today.
@gildor Unfortunately, I couldn’t reproduce it. It would be nice to get a sample project.
g
@yan I can confirm that I cannot reproduce it on simple project just using standart configuration. I’m investigating how sample project differs from my main project. But still looks that extension function
String.iterateDollars
works incorrectly, not sure when it should be called. For example this is output of this function with inner class name:
Copy code
"my.package.SomeClass.SomeInnerClass".iterateDollars { o, i -> println("'$o' - '$i'") }
// 'my.package.SomeClass.SomeInnerClass' - ''
With anonymous class everything works fine:
Copy code
"my.package.SomeClass.SomeInnerClass$1".iterateDollars { o, i -> println("'$o' - '$i'") }
// 'my.package.SomeClass.SomeInnerClass' - '1'
But with dollar on the first place output is broken:
Copy code
"my.package.$SomeClass.SomeInnerClass".iterateDollars { o, i -> println("'$o' - '$i'") }
// 'my.package.' - 'SomeClass.SomeInnerClass'
Okay, I’ve figure out. It’s not a problem of stub generation class with dollar in name, but if you have import with $. I can reproduce it with:
Copy code
import my.package.`$AutoValue_MyClass`.Builder as MyClassBuilder
This is sample project where you can reproduce it (use branch KT-22493) https://github.com/gildor/kotlin-android-sample/tree/KT-22493