mirror of
https://github.com/datahub-project/datahub.git
synced 2025-07-31 21:36:08 +00:00
95 lines
2.5 KiB
Groovy
95 lines
2.5 KiB
Groovy
apply plugin: 'play'
|
|
|
|
// Change this to listen on a different port
|
|
project.ext.httpPort = 9001
|
|
project.ext.playBinaryBaseName = "datahub-frontend"
|
|
|
|
tasks.withType(PlayRun) {
|
|
httpPort = project.ext.httpPort
|
|
}
|
|
|
|
configurations {
|
|
assets
|
|
}
|
|
|
|
dependencies {
|
|
if (project.hasProperty('enableEmber') && project.getProperty('enableEmber').toBoolean()) {
|
|
assets project(path: ':datahub-web', configuration: 'assets')
|
|
} else {
|
|
assets project(path: ':datahub-web-react', configuration: 'assets')
|
|
}
|
|
|
|
constraints {
|
|
play('org.springframework:spring-core:5.2.3.RELEASE')
|
|
play('com.fasterxml.jackson.core:jackson-databind:2.9.10.4')
|
|
play('com.nimbusds:nimbus-jose-jwt:7.9')
|
|
play('com.typesafe.akka:akka-actor_2.11:2.5.16')
|
|
play('net.minidev:json-smart:2.4.1')
|
|
play('io.netty:netty-all:4.1.44.Final')
|
|
}
|
|
play project(":datahub-graphql-core")
|
|
play project(":metadata-service:auth-api")
|
|
|
|
play externalDependency.jettyJaas
|
|
play externalDependency.graphqlJava
|
|
play externalDependency.antlr4Runtime
|
|
play externalDependency.antlr4
|
|
|
|
play externalDependency.jerseyCore
|
|
play externalDependency.jerseyGuava
|
|
|
|
play externalDependency.pac4j
|
|
play externalDependency.playPac4j
|
|
play externalDependency.shiroCore
|
|
play externalDependency.playCache
|
|
play externalDependency.playWs
|
|
play externalDependency.kafkaClients
|
|
|
|
playTest externalDependency.mockito
|
|
playTest externalDependency.playTest
|
|
|
|
playRun externalDependency.lombok
|
|
playRun externalDependency.guice
|
|
playRun externalDependency.playDocs
|
|
playRun externalDependency.playGuice
|
|
playRun externalDependency.logbackClassic
|
|
}
|
|
|
|
model {
|
|
components {
|
|
play {
|
|
platform play: '2.6.18', scala: '2.11', java: '1.8'
|
|
injectedRoutesGenerator = true
|
|
|
|
binaries.all {
|
|
tasks.withType(PlatformScalaCompile) {
|
|
scalaCompileOptions.forkOptions.jvmArgs = ['-Xms1G', '-Xmx1G', '-Xss2M']
|
|
}
|
|
}
|
|
|
|
binaries.all { binary ->
|
|
binary.assets.addAssetDir moveAssets.destinationDir
|
|
binary.assets.builtBy moveAssets
|
|
}
|
|
}
|
|
}
|
|
distributions {
|
|
playBinary {
|
|
baseName = project.ext.playBinaryBaseName
|
|
}
|
|
}
|
|
}
|
|
|
|
task unzipAssets(type: Copy, dependsOn: [configurations.assets, ':datahub-web-react:yarnBuild']) {
|
|
into "${buildDir}/assets"
|
|
from {
|
|
configurations.assets.collect { zipTree(it) }
|
|
}
|
|
}
|
|
|
|
// move assets/assets into assets
|
|
task moveAssets(type: Copy, dependsOn: unzipAssets) {
|
|
into "${buildDir}/assets"
|
|
from ("${buildDir}/assets/assets")
|
|
}
|