[SOLVED] Gradle fails after kotlin serialization plugin update to 1.7.10

Issue

This Content is from Stack Overflow. Question asked by sigma1510

My build.gradle.kts starts as follows:

...
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
  ...
  
  kotlin("jvm")
  kotlin("plugin.serialization") version "1.6.21"
}

When I try to update the kotlin serialization plugin to the more recent 1.7.10 version, I get the following compilation error:

A problem occurred configuring project ':my-little-project'.
> Failed to notify project evaluation listener.
   > org.jetbrains.kotlin.gradle.plugin.KotlinGradleSubplugin: org.jetbrains.kotlinx.serialization.gradle.SerializationGradleSubplugin not a subtype
   > org.jetbrains.kotlin.gradle.plugin.KotlinGradleSubplugin: org.jetbrains.kotlinx.serialization.gradle.SerializationGradleSubplugin not a subtype

How do I fix this? Thanks!

Stack trace (too large to post completely, for more just ask):

Exception is:
org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':my-little-project'.
    at org.gradle.configuration.project.LifecycleProjectEvaluator.wrapException(LifecycleProjectEvaluator.java:75)
    at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:68)
    at org.gradle.configuration.project.LifecycleProjectEvaluator.access$400(LifecycleProjectEvaluator.java:51)
...
Caused by: org.gradle.internal.event.ListenerNotificationException: Failed to notify project evaluation listener.
    at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:89)
    at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:346)
    at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:249)
...

Solution by sigma1510

Thanks @aSemy for listing what turned out to be the issue. Our microservice architecture meant there was another, overarching, build.gradle.kts file which contained this line that also needed updating:

kotlin("jvm") version "1.6.10" apply false

For more tutorials visit Jtuto.com


This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 4.0.

people found this article helpful. What about you?