mirror of
https://github.com/jlengrand/atrium.git
synced 2026-03-10 08:01:19 +00:00
move nodejs/npm binaries to rootProject
we can reuse the nodejs/npm binaries for multiple sub projects or in other words, no need to have one per sub project.
This commit is contained in:
@@ -172,7 +172,9 @@ configure(bundleSmokeTests) {
|
||||
}
|
||||
}
|
||||
|
||||
def createRegisterJsServicesTask(Project project, String packageName, java.util.function.Function<String, Boolean> filter) {
|
||||
import java.util.function.Function
|
||||
|
||||
def createRegisterJsServicesTask(Project project, String packageName, Function<String, Boolean> filter) {
|
||||
configure(project) {
|
||||
def registerJsServices = project.tasks.create(name: 'generateJsRegisterServices', group: 'build') {
|
||||
def jvm = "${getProjectNameWithoutSuffix(project)}-jvm"
|
||||
|
||||
@@ -11,6 +11,12 @@ dependencies {
|
||||
testCompile prefixedProject('verbs-internal-js')
|
||||
}
|
||||
|
||||
//TODO should not be necessary https://youtrack.jetbrains.com/issue/KT-27797
|
||||
compileTestKotlin2Js.dependsOn(
|
||||
prefixedProject('core-robstoll-js').compileKotlin2Js,
|
||||
prefixedProject('domain-robstoll-js').compileKotlin2Js
|
||||
)
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
maven { url "https://plugins.gradle.org/m2/" }
|
||||
@@ -39,9 +45,13 @@ task populateNodeModules(type: Copy, dependsOn: compileKotlin2Js) {
|
||||
into "${buildDir}/node_modules"
|
||||
}
|
||||
|
||||
def nodeModules = file("$rootProject.projectDir/gradle/node_modules")
|
||||
node {
|
||||
download = true
|
||||
npmVersion = '6.4.1'
|
||||
workDir = file("$rootProject.projectDir/.gradle/nodejs")
|
||||
npmWorkDir = file("$rootProject.projectDir/.gradle/npm")
|
||||
nodeModulesDir = nodeModules
|
||||
}
|
||||
|
||||
task installMocha(type: NpmTask) {
|
||||
@@ -50,13 +60,7 @@ task installMocha(type: NpmTask) {
|
||||
|
||||
task prepareMocha(dependsOn: [compileTestKotlin2Js, populateNodeModules, installMocha])
|
||||
task runMocha(type: NodeTask, dependsOn: [prepareMocha, test]) {
|
||||
script = file('node_modules/mocha/bin/mocha')
|
||||
script = file("$nodeModules/mocha/bin/mocha")
|
||||
args = [compileTestKotlin2Js.outputFile]
|
||||
}
|
||||
check.dependsOn runMocha
|
||||
|
||||
//TODO should not be necessary https://youtrack.jetbrains.com/issue/KT-27797
|
||||
compileTestKotlin2Js.dependsOn(
|
||||
prefixedProject('core-robstoll-js').compileKotlin2Js,
|
||||
prefixedProject('domain-robstoll-js').compileKotlin2Js
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user