datahub/datahub-web-react/build.gradle
david-leifker ecc01b9a46
refactor(restli-mce-consumer) (#6744)
* fix(security): commons-text in frontend

* refactor(restli): set threads based on cpu cores
feat(mce-consumers): hit local restli endpoint

* testing docker build

* Add retry configuration options for entity client

* Kafka debugging

* fix(kafka-setup): parallelize topic creation

* Adjust docker build

* Docker build updates

* WIP

* fix(lint): metadata-ingestion lint

* fix(gradle-docker): fix docker frontend dep

* fix(elastic): fix race condition between gms and mae for index creation

* Revert "fix(elastic): fix race condition between gms and mae for index creation"

This reverts commit 9629d12c3bdb3c0dab87604d409ca4c642c9c6d3.

* fix(test): fix datahub frontend test for clean/test cycle

* fix(test): datahub-frontend missing assets in test

* fix(security): set protobuf lib datahub-upgrade & mce/mae-consumer

* gitingore update

* fix(docker): remove platform on docker base image, set by buildx

* refactor(kafka-producer): update kafka producer tracking/logging

* updates per PR feedback

* Add documentation around mce standalone consumer
Kafka consumer concurrency to follow thread count for restli & sql connection pool

Co-authored-by: leifker <dleifker@gmail.com>
Co-authored-by: Pedro Silva <pedro@acryl.io>
2022-12-26 16:09:08 +00:00

116 lines
2.6 KiB
Groovy

plugins {
id 'java'
}
apply plugin: 'distribution'
apply plugin: 'com.github.node-gradle.node'
node {
// If true, it will download node using above parameters.
// If false, it will try to use globally installed node.
if (project.hasProperty('useSystemNode')) {
download = ! project.getProperty('useSystemNode').toBoolean()
} else {
download = false
}
// Version of node to use.
version = '16.8.0'
// Version of Yarn to use.
yarnVersion = '1.22.0'
// Base URL for fetching node distributions (set nodeDistBaseUrl if you have a mirror).
if (project.hasProperty('nodeDistBaseUrl')) {
distBaseUrl = project.getProperty('nodeDistBaseUrl')
} else {
distBaseUrl = 'https://nodejs.org/dist'
}
// Set the work directory for unpacking node
workDir = file("${project.projectDir}/.gradle/nodejs")
// Set the work directory for NPM
yarnWorkDir = file("${project.projectDir}/.gradle/yarn")
// Set the work directory where node_modules should be located
nodeModulesDir = file("${project.projectDir}")
}
/*
Wrappers around Yarn Tasks.
*/
task yarnInstall(type: YarnTask) {
args = ['install']
}
task yarnGenerate(type: YarnTask, dependsOn: yarnInstall) {
args = ['run', 'generate']
}
task yarnServe(type: YarnTask, dependsOn: [yarnInstall, yarnGenerate]) {
args = ['run', 'start', '--proxy', 'http://localhost:9001']
}
task yarnTest(type: YarnTask, dependsOn: [yarnInstall, yarnGenerate]) {
args = ['run', 'test', '--watchAll', 'false']
}
task yarnLint(type: YarnTask, dependsOn: [yarnInstall, yarnGenerate]) {
args = ['run', 'lint']
}
test.dependsOn([yarnInstall, yarnTest, yarnLint])
task yarnLintFix(type: YarnTask, dependsOn: [yarnInstall, yarnGenerate]) {
args = ['run', 'lint-fix']
}
task yarnBuild(type: YarnTask, dependsOn: [yarnInstall, yarnTest, yarnLint]) {
args = ['run', 'build']
}
task yarnQuickBuild(type: YarnTask, dependsOn: [yarnInstall, yarnGenerate]) {
args = ['run', 'build']
}
task cleanExtraDirs {
delete 'node_modules'
delete 'dist'
delete 'tmp'
delete 'just'
delete 'src/types.generated.ts'
delete fileTree('../datahub-frontend/public')
delete fileTree(dir: 'src/graphql', include: '*.generated.ts')
}
clean.finalizedBy(cleanExtraDirs)
configurations {
assets
}
distZip {
dependsOn yarnQuickBuild
baseName 'datahub-web-react'
from 'dist'
}
task copyAssets(dependsOn: distZip) {
doLast {
copy {
from zipTree(distZip.outputs.files.first())
into "../datahub-frontend/public"
}
}
}
jar {
dependsOn distZip, copyAssets
into('public') {
from zipTree(distZip.outputs.files.first())
}
classifier = 'assets'
}