mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-27 09:58:14 +00:00
128 lines
3.6 KiB
Groovy
128 lines
3.6 KiB
Groovy
apply plugin: "org.gradle.playframework"
|
|
|
|
// 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.12:2.5.16')
|
|
play('net.minidev:json-smart:2.4.1')
|
|
play('io.netty:netty-all:4.1.68.Final')
|
|
}
|
|
compile project(":metadata-service:restli-client")
|
|
compile project(":metadata-service:auth-api")
|
|
|
|
implementation externalDependency.jettyJaas
|
|
implementation externalDependency.graphqlJava
|
|
implementation externalDependency.antlr4Runtime
|
|
implementation externalDependency.antlr4
|
|
implementation externalDependency.akkaHttp
|
|
|
|
implementation externalDependency.jerseyCore
|
|
implementation externalDependency.jerseyGuava
|
|
|
|
implementation(externalDependency.pac4j) {
|
|
exclude group: "net.minidev", module: "json-smart"
|
|
exclude group: "com.nimbusds", module: "nimbus-jose-jwt"
|
|
}
|
|
implementation "com.nimbusds:nimbus-jose-jwt:7.9"
|
|
implementation externalDependency.jsonSmart
|
|
implementation externalDependency.playPac4j
|
|
implementation externalDependency.shiroCore
|
|
implementation externalDependency.playCache
|
|
implementation externalDependency.playEhcache
|
|
implementation externalDependency.playWs
|
|
implementation externalDependency.playServer
|
|
implementation externalDependency.playAkkaHttpServer
|
|
implementation externalDependency.kafkaClients
|
|
implementation externalDependency.awsMskIamAuth
|
|
|
|
testImplementation externalDependency.mockito
|
|
testImplementation externalDependency.playTest
|
|
testCompile externalDependency.testng
|
|
|
|
compileOnly externalDependency.lombok
|
|
runtime externalDependency.guice
|
|
runtime (externalDependency.playDocs) {
|
|
exclude group: 'com.typesafe.akka', module: 'akka-http-core_2.12'
|
|
}
|
|
runtime externalDependency.playGuice
|
|
runtime externalDependency.logbackClassic
|
|
|
|
annotationProcessor externalDependency.lombok
|
|
}
|
|
|
|
dist.dependsOn(':datahub-web-react:copyAssets')
|
|
|
|
play {
|
|
platform {
|
|
playVersion = '2.7.6'
|
|
scalaVersion = '2.12'
|
|
javaVersion = JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
injectedRoutesGenerator = true
|
|
}
|
|
|
|
model {
|
|
components {
|
|
play {
|
|
platform play: '2.7.6', scala: '2.12', 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
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
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")
|
|
}
|
|
|
|
clean {
|
|
delete 'public/platforms'
|
|
delete 'public/static'
|
|
delete 'public/asset-manifest.json'
|
|
delete 'public/manifest.json'
|
|
delete 'public/robots.txt'
|
|
delete 'public/logo.png'
|
|
delete 'public/index.html'
|
|
delete 'public/favicon.ico'
|
|
}
|