![]() I tried to put the “apply” inside the buildscript block, could not make it work. So the problem is, the plugin is not applied to the buildscript itself. Make sure that you’ve setup your buildscript correctly and re-import project. rialization compiler plugin is not applied to the module, so this annotation would not be processed. Mark the class as or provide the serializer explicitly.īut I do use When I hover the mouse over it, I see this: Serializer for class ‘Configuration’ is not found. The “decodeFromConfig” fails with the following error: Val envConf = codeFromConfig(typesafeConf) ![]() Val typesafeConf = .parseFile(File(“src/env.conf”)) Then I try to extract configuration like this: Then I defined my data classes and I use “ annotation on them. I also added the dependency in “buildscript” block:Ĭlasspath(group = “com.typesafe”, name = “config”, version = “1.4.1”)Ĭlasspath(group = “”, name = “kotlinx-serialization-hocon”, version = “1.3.0”) ![]() Kotlin(“rialization”) version kotlinVersion So I added the plugin to the “plugins” block: I want to use kotlin serialization in the build script itself ().
0 Comments
Leave a Reply. |