What would a basic Gradle script Kotlin file for a Kotlin JS project look like?

255 views Asked by At

I'm trying to use Kotlin-DSL to write a Gradle build script in Kotlin. So far I've seen examples on how this can be done for a Java project. However since I'm developing a React Native app in Kotlin, there isn't any tutorials I've found for making one for Kotlin/JavaScript projects. So what would a basic Gradle script Kotlin file for such a purpose look like?

3

There are 3 answers

0
eskatos On BEST ANSWER

The official Gradle Kotlin DSL repository contains a basic Kotlin/JS sample: https://github.com/gradle/kotlin-dsl/tree/master/samples/hello-js

1
Alexey Andreev On

You can find tutorial for Kotlin/JS with gradle here on official Kotlin site. Also, you may look at example which shows how to use Kotlin/JS with Gradle and Webpack.

0
Pavan P On

So after quite a bit of researching, I found a example that suited my needs.