I am running into troubles with the upgrade to M5 for an android project.
Here’s an example:
I am using
This returns an array of drawables (top, left, bottom and right), with the values at null if there are no drawable defined for one of the sides.
With M4 the signature was:
fun getCompoundDrawables(): Array<Drawable?>?
With M5 it is:
fun getCompoundDrawables(): Array<Drawable>?
Cleary this is wrong and the signature should be:
fun getCompoundDrawables(): Array<Drawable?>
I understand that the new default might be better, and that I am supposed to use annotations to specify the correct signature.
But that’s where I run into troubles.
I do not know how to set the annotation.
In my own java code, I get the option to “Edit custom Kotlin Signature”, but not in the java code from the SDK.
How do I setup my project to use external annotations?
I think my project is setup to write annotations in a dependencies/annotations directory that I specified once, but how do I check that it is working properly. Where is it defined?
I’ve looked at the jar for the jdk annotations and I have only found examples of @NotNull annotations.
What does an annotation like:
@KotlinSignature(“var values : Set<String?>?”)
Look like in an annotations.xml?