-
|
Are there known issues when using Codable in a multi-module app? Encoding seems fine, but decoding seems to fail when the decodable model is defined in another module. |
Beta Was this translation helpful? Give feedback.
Answered by
marcprux
Oct 27, 2025
Replies: 1 comment 10 replies
-
|
Hmm … there shouldn't be any issues that I am aware of. We're definitely exercising both encoding and decoding Codable instances from other modules. Can you post an error message? And ideally some or all of the Codable type? |
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There's nothing wrong with the project. It looks like we need to improve the generation of
@Keepannotations for Skip Codables.Android's R8 (or Proguard) is a build step for optimizing and shrinking the Java bytecode for release builds. In some cases, this can cause issues when types need to be looked up by name (also known as "reflection"). Skip does need to sometimes do this for encoding/decoding as well as access to static members.
You can read all about customizing the R8/Proguard settings at https://developer.android.com/topic/performance/app-optimization/keep-rules-overview, but to make a long story short, you are probably safe with just sticking with the modifications you made to …