Skip to content

Commit

Permalink
Convert kaapi build.gradle to kts
Browse files Browse the repository at this point in the history
  • Loading branch information
lnhrdt committed Mar 16, 2019
1 parent 078bfec commit 18726f5
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 17 deletions.
3 changes: 3 additions & 0 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ object Versions {
const val mockitoKotlinVersion = "2.0.0-alpha04"
const val arrowVersion = "0.7.2"
const val beakVersion = "0.0.21"

const val node = "8.8.1"
const val yarn = "1.2.1"
}
17 changes: 0 additions & 17 deletions kaapi/build.gradle

This file was deleted.

37 changes: 37 additions & 0 deletions kaapi/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import com.moowork.gradle.node.NodeExtension
import com.moowork.gradle.node.yarn.YarnTask

apply {
plugin("com.moowork.node")
}

configure<NodeExtension> {
version = Versions.node
yarnVersion = Versions.yarn
download = true
}

buildscript {
repositories {
mavenCentral()
gradlePluginPortal()
}

dependencies {
classpath("com.moowork.gradle:gradle-node-plugin:1.2.0")
}
}

tasks {
val yarnInstallTask = getByName<YarnTask>("yarn_install")

val yarnTestTask = getByName<YarnTask>("yarn_test") {
setEnvironment(mapOf("CI" to true))
}

register("test") {
dependsOn(yarnInstallTask)
dependsOn(yarnTestTask)
yarnTestTask.dependsOn(yarnInstallTask)
}
}

0 comments on commit 18726f5

Please sign in to comment.