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
yan
01/25/2018, 1:29 PM
Thank you, I will look into this today.
yan
01/25/2018, 3:18 PM
@gildor Unfortunately, I couldn’t reproduce it. It would be nice to get a sample project.
g
gildor
01/26/2018, 9:59 AM
@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' - ''
gildor
01/26/2018, 10:02 AM
With anonymous class everything works fine:
Copy code
"my.package.SomeClass.SomeInnerClass$1".iterateDollars { o, i -> println("'$o' - '$i'") }
// 'my.package.SomeClass.SomeInnerClass' - '1'
gildor
01/26/2018, 10:04 AM
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'
gildor
01/26/2018, 10:16 AM
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