Xabier Gorostidi
11/03/2023, 4:46 PMjavaParameters = true
. The documentation states: “Generate metadata for Java 1.8 reflection on method parameters”. Do I need to do that in order to preserve named parameters from Kotlin (lib) => Kotlin (app)? What is exactly that metadata, would I be exposing anything else relevant? If I attach the sources.jar file, wouldn’t be enough for the app to infer the naming parameters?ephemient
11/03/2023, 5:06 PMephemient
11/03/2023, 5:07 PMXabier Gorostidi
11/03/2023, 5:08 PMjavaParameters = true
parameter?ephemient
11/03/2023, 5:10 PMMETA-INF/*.kotlin_module
files and @kotlin.Metadata
annotations that the Kotlin compiler always producesephemient
11/03/2023, 5:10 PMXabier Gorostidi
11/03/2023, 5:10 PMephemient
11/03/2023, 5:12 PMXabier Gorostidi
11/04/2023, 3:03 PMPedro Varela
11/04/2023, 10:51 PMXabier Gorostidi
11/04/2023, 11:12 PMXabier Gorostidi
11/09/2023, 6:46 PM-keep class kotlin.Metadata
-keep,allowobfuscation class kotlin.Metadata { *; }
In fact, inspecting the content of the AAR I can see the _kotlin.metadata
file there with the same 70B size than when it works.
The symptoms of the errors are like the metadata is not processed. Kotlin naming parameters, top level functions and so on are not resolved. Clicking on a top level function for example, when it works, it is displayed in Kotlin with that public function’s high order function parameters. However when it doesn’t, it’s displayed in Java with a private interface based content.
I don’t really know but somehow obfuscation + Kotlin version are involved here.ephemient
11/09/2023, 6:48 PMXabier Gorostidi
11/09/2023, 6:54 PMlib
’s folder each time I rebuild the library. I mean, all of them are fresh compilations. You mean the obfuscator of the app needs to understand the metadata of the library in order to interprete it?ephemient
11/09/2023, 6:56 PMephemient
11/09/2023, 6:57 PMephemient
11/09/2023, 6:57 PMephemient
11/09/2023, 6:58 PMXabier Gorostidi
11/09/2023, 6:58 PMXabier Gorostidi
11/09/2023, 6:59 PMephemient
11/09/2023, 6:59 PMephemient
11/09/2023, 6:59 PMephemient
11/09/2023, 7:00 PMephemient
11/09/2023, 7:02 PM-keep kotlin.Metadata
, only libraries that want to be obfuscated, which (AFAIK) is rareXabier Gorostidi
11/09/2023, 7:05 PM7.3.0
, and testing Kotlin 1.7.10
to 1.8.22
. It seems there’s a major version change of R8 3.x to 4.x. Is that what you mean?ephemient
11/09/2023, 7:06 PMXabier Gorostidi
11/09/2023, 7:12 PMXabier Gorostidi
11/09/2023, 7:16 PM1.7.10
, or the latest like 1.9.20
. The latter choice implies us to stay on alert not using Kotlin features introduced on 1.8.x and 1.9.x, to not force a 1.7.x consumer update Kotlin for us.ephemient
11/09/2023, 7:20 PMephemient
11/09/2023, 7:21 PMXabier Gorostidi
11/09/2023, 9:48 PM