JetBrains has made this change for Kotlin >= 1.3.40: KT-30289.
Consider this function from net.corda.core.serialization.SerializationAPI:
Kotlin will generate two versions of this function in the class’s byte code:
and
However, because Kotlin omits the @DeleteForDJVM annotation from the second version, our JarFilter plugin does not realise that the second function also needs to be deleted.
The result is that the function remains in the core-deterministic byte code and breaks the build with errors like these:
We cannot upgrade to Kotlin >= 1.3.40 until we fix this.
This will be fixed in Corda Gradle plugins 5.0.3.