I'm trying to add Kotlin Serialization to my Custom Plugin.
How do I put
Copy code
plugins {
kotlin("plugin.serialization") version "1.5.30"
}
into
Copy code
override fun apply(project: Project) {
// none of these work
// project.pluginManager.apply("org.jetbrains.kotlin.plugin.serialization:1.5.30")
// project.pluginManager.apply("org.jetbrains.kotlin.plugin.serialization")
// project.plugins.apply("org.jetbrains.kotlin.plugin.serialization:1.5.30")
// project.plugins.apply("org.jetbrains.kotlin.plugin.serialization")
}
Everything I have tried give me an error
Plugin with id 'org.jetbrains.kotlin.plugin.serialization' not found
r
rnett
10/15/2021, 8:07 PM
Do you have an api dependency on the kotlinx serialization plugin in yours? It needs to be on the classpath for apply to work.