- See this doc for details: https://github.com/airbytehq/airbyte/blob/master/docs/contributing-to-airbyte/developing-locally.md - Unit test does not work yet.
43 lines
1.0 KiB
Groovy
43 lines
1.0 KiB
Groovy
plugins {
|
|
id "base"
|
|
id "com.github.node-gradle.node" version "3.1.1"
|
|
}
|
|
|
|
def nodeVersion = System.getenv('NODE_VERSION') ?: '14.11.0'
|
|
|
|
node {
|
|
download = true
|
|
version = nodeVersion
|
|
}
|
|
|
|
npm_run_build {
|
|
inputs.files fileTree('public')
|
|
inputs.files fileTree('src')
|
|
inputs.file 'package.json'
|
|
inputs.file 'package-lock.json'
|
|
|
|
// todo (cgardens) - the plugin seems to ignore this value when the copy command is run. ideally the output would be place in build/app.
|
|
outputs.dir project.buildDir
|
|
}
|
|
|
|
task test(type: NpmTask) {
|
|
dependsOn assemble
|
|
|
|
args = ['run', 'test', '--', '--watchAll=false', '--silent']
|
|
inputs.files fileTree('src')
|
|
inputs.file 'package.json'
|
|
inputs.file 'package-lock.json'
|
|
}
|
|
|
|
assemble.dependsOn npm_run_build
|
|
build.finalizedBy test
|
|
|
|
task copyDocs(type: Copy) {
|
|
from "${System.getProperty("user.dir")}/docs/integrations"
|
|
into "${buildDir}/docs/integrations"
|
|
duplicatesStrategy DuplicatesStrategy.INCLUDE
|
|
}
|
|
|
|
copyDocs.dependsOn npm_run_build
|
|
assemble.dependsOn copyDocs
|