kotlinx.serialization: Gradle configuration error: Cannot add extension with name 'kotlinNodeJs'
In multiplatform project which is also muiltiproject: as soon as I add id 'kotlinx-serialization' version '1.3.40' to plugins of one of subprojects, gradle can no longer configure other subprojects and fails with the following error:
Cannot add extension with name ‘kotlinNodeJs’, as there is an extension already registered with that name.
Environment
- Kotlin version: 1.3.40
- Kotlin platforms: Multiplatform
- Gradle version: 4.10.3
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15 (6 by maintainers)
I was able to replicate the problem. The issue occurs when I include a Kotlin multi-platform project with browser support in another that uses “kotlinx.serialization” library. I will create a project with that problem later.
I get this issue when I try to apply the plugin into a Kotlin JS project for browsers. This is the complete error:
I am using these plugins:
I tried to use (apply false) but this did not work.