I'm releasing a new version of my internal library...
# multiplatform
m
I'm releasing a new version of my internal library. Everything has worked fine with the test app I use that consumes the dependency as a project dependency. I'm now testing our test app that consumes it as a dependency from a maven repository. The dependencies are resolved correctly, but it is not finding all the symbols. Seems like it doesn't find the top level functions, top level extension functions or top level type aliases. Some of these are part of expect/actual but not all of them. If I drag the class files containing these into Intellij, the symbols are in the file. This test app is not multiplatform and it is correctly downloading the android version of the artifacts. I'm not sure what else to look at for the missing symbols. The biggest changes I made were upgrading Kotlin from 1.9.0 to 1.9.10 and AGP from 8.0.0 to 8.1.2.
m
Looks like your
.aar
is missing/stripping the
.kotlin_module
files? Are they present if you unzip it?
Like could it be an aggressive R8/proguard config?
m
R8 isn't enabled for the library. Where would the kotlin_module file be placed?
m
They're in
META-INF
something IIRC
m
I have a feeling that missing file is the problem. I see that this got added to my build script.
Copy code
packagingOptions {
                resources.excludes += "META-INF/**"
            }
m
yup
Probably want to keep some of that if you're shipping a lib (app doesn't care cause no one is going to build against an app)
m
yeah, thanks for the help
e
https://kotlinlang.slack.com/archives/C0B8M7BUY/p1699031240861069 there's also some requirements on AGP/R8 version per Kotlin version, but you're fine there
stripping
META-INF/*.kotlin_module
would have broken top-levels in all versions of Kotlin though, did you add that recently?
m
yeah, it was added this most recent release. Now, I need to figure out why and do the correct fix instead of what is there.