In a gradle multi-module setup with the kotlin js ...
# javascript
p
In a gradle multi-module setup with the kotlin js plugin executing tests from Idea does not work. Running gradle tasks from the ui does not work either. Both work fine on the command line. Both print the following error when run from the IDE
Copy code
Build file '.../hydrants/hydrants-cloud-functions/build.gradle.kts' line: 1
* What went wrong:
Plugin [id: 'org.jetbrains.kotlin.js'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (plugin dependency must include a version number for this source)
line 1 of is
_kotlin_(*“js”*)
inside the plugins block. It is almost as if Idea tried to parse the gradle file as if it was a standalone project
my setup is more or less like this https://github.com/ilgonmic/kotlinjs-multi-module except with kotlin 1.3.71 and gradle 6.3
It is possible to run a gradle task from the ide iff it belongs to the parent/root project, but not if it belongs to a child project
i
Could you please provide reproducer? I can’t reproduce it in
kotlinjs-multi-module
project 😞
p
My bad. It happens if there is a
settings.gradle
file in one of the subprojects (even if it is empty)
I guess it is not an issue specific to kotlin js. There must be only one settings.gradle per project. So it is an error on my part. It would be nice if the error was detected by Idea somehow
i
I think you can fill issue on IDEA project to improve experience in this part https://youtrack.jetbrains.com/issues/IDEA