I just make a PR of such example. It is basically ...
# javascript
n
I just make a PR of such example. It is basically copy-paste from my own project, which works better than I am expected: https://github.com/JetBrains/kotlin-wrappers/pull/98/files
j
I'm just seeing red in the build.gradle.kts file anything
org.jetbrains.....
is marked as red with
unresolved reference "jetbrains"
if i clone the whole kotlin-wrappers repo and create my project inside that kotlin-wrappers project, the import errors goes away, the red lines under compile is still there. That root build.gradle is doing some magic in the background time to figure out how to merge this, so many new things all at once 😄
n
You probably are missing kotlin frotent plugin 🙂
Copy code
buildscript {
    repositories {
        maven("<https://dl.bintray.com/kotlin/kotlin-eap>")

    }
    dependencies {
        classpath("org.jetbrains.kotlin:kotlin-frontend-plugin:${Versions.kotlinFrontend}")
    }
}

apply {
    plugin("org.jetbrains.kotlin.frontend")
}
This plugin makes things a lot easier. BTW, this plugin doesn't work with Gradle 5.x
j
i'm on gradle 4.10 and i have the frontend plugin, i've literally copied your code as is, now trying to add some stuff in to make it work
Screenshot 2019-01-20 at 21.01.15.png
Screenshot 2019-01-20 at 21.01.21.png
n
sometimes IDE doesn't catch DSL dependencies, but config is working
j
ok, let's see if it runs
gradle webpack-run
gives me
Copy code
* Where:
Build file '/Users/vlad/Code/partner-risk/frontend/build.gradle.kts' line: 15

* What went wrong:
Plugin [id: 'kotlin2js'] was not found in any of the following sources:

- Gradle Core Plugins (not a core plugin, please see <https://docs.gradle.org/4.10.2/userguide/standard_plugins.html> for available core plugins)
- Plugin Repositories (plugin dependency must include a version number for this source)
-
n
That is strange. I have some global repos:
Copy code
repositories {
        jcenter()
        mavenCentral()
        maven("<https://kotlin.bintray.com/kotlinx>")
    }
j
what does your root build.gradle file look like?
n
Copy code
plugins {
    kotlin("jvm") version "1.3.11" apply false
}

buildscript {
    repositories {
        jcenter()
        mavenCentral()
        maven("<https://kotlin.bintray.com/kotlinx>")
    }
    dependencies {
        classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin}")
        classpath("org.jetbrains.kotlin:kotlin-serialization:${Versions.kotlin}")
    }
}