Cannot configure KMP project with JS target
See original GitHub issueBuild Environment SQLDelight version: 1.5.0 OS: Windows Gradle version: 7.0.1 Kotlin version: 1.5.0 AGP Version (if applicable): N/A
Example: project-2.zip
Describe the bug
- This project contains a few modules for a KMP project. For simplicity’s sake there is no source code, only the gradle files.
- The
app/build.gradle
file line 18 addscom.squareup.sqldelight:gradle-plugin:1.5.0
to the classpath. - When I try to launch any tasks from gradle I get the error:
Caused by: java.lang.IllegalStateException: The Kotlin Gradle plugin was loaded multiple times in different subprojects, which is not supported and may break the build.
This might happen in subprojects that apply the Kotlin plugins with the Gradle 'plugins { ... }' DSL if they specify explicit versions, even if the versions are equal.
Please add the Kotlin plugin to the common parent project or the root project, then remove the versions in the subprojects.
If the parent project does not need the plugin, add 'apply false' to the plugin line.
- If I were to remove the classpath, the project configures and compiles correctly. Otherwise if I remove the JS target in
gradle/mpp-lib.gradle
, the project is also able to configure and compile.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
javascript as target in kotlin multiplatform library - Stack Overflow
I'm building a Kotlin multiplatform library. One of the targets in this project is javascript. In the source ...
Read more >If I add a js target to my KMP build I get the following err | Gradle
If I add a js target to my KMP build I get the following error Build was configured to prefer settings repositories over...
Read more >How can i use jsMain in KMP?When can we update ... - GitHub
I removed the js(IR) config,and build a project named web,dependent on the common project. When i run the jsBrowserRun or jsBrowserWebpack got ...
Read more >Adding a new target to your KMP project: hello watchOS
I've recently added support for watchOS on a project that already shares its business logic through Android, iOS, and Desktop. As always, this...
Read more >Introducing Kotlin Multiplatform in an existing project
When starting a new blank KMP project it is easier to have a ... because the configuration and the target architecture are computed...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah they don’t have to be, but it’s safest to do it that way because of problems like this.
Going to close. Thanks for looking @dellisd!
That makes sense. Thanks for the insight.