kotlinx.serialization
kotlinx.serialization copied to clipboard
kotlinx-serialization-hocon can not be used without kotlinx-serialization-core
Describe the bug
It is impossible to use kotlinx-serialization-hocon without kotlinx-serialization-core added explicitly because core module is added with implementation configuration in hocon module:
https://github.com/Kotlin/kotlinx.serialization/blob/d5bc32dc11d2a8a08c36663b93839d4fe91f4507/formats/hocon/build.gradle#L22
To Reproduce
- Add
kotlinx-serialization-hoconto dependencies. - Try to use annotation
@Serializable. - You will get an errors like:
Unresolved reference: Serializable
Expected behavior
core module should be added to dependencies transitively
Environment
- Kotlin version: 1.7.10
- Library version: 1.3.3 and 1.4.0