is there a gradle option/task/script to extract it...
# javascript
e
is there a gradle option/task/script to extract it from the bundled compiler?
e
we tried that, it has no effect
seems outdated (2006)?
k
And you can use https://github.com/Kotlin/kotlin-frontend-plugin as well. It extracts all dependencies, compiles project and creates JS bundle
e
oh I see, we'll try, thanks!
k
You can try following gradle config:
Copy code
task copyJsFilesFromDependencies(type: Copy, dependsOn: 'compileKotlin2Js') {
        into "${buildDir}/libs"
        includeEmptyDirs = false
        from {
            configurations.compile.collect { zipTree(it) }
        }
        include {
            def path = it.path
            path.endsWith(".js") && !path.endsWith(".meta.js")
        }
    }
e
I should note that we searched the build directory (and all subfolders) and there's no trace of the standard lib
only the main app output
k
This won't be copied automatically
There should be
kotlin-stdlib-js.jar
somewhere. If you unpack it, you'll find
kotlin.js
among others
The provided gradle snippet merely unzips
js
files from given jar file
e
Yeah there's no jar for the standard lib
That's the issue