2022-05-10 18:15:53 -05:00
|
|
|
apply plugin: "org.gradle.playframework"
|
2019-08-31 20:51:14 -07:00
|
|
|
|
|
|
|
// 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 {
|
2021-04-06 16:10:50 -07:00
|
|
|
if (project.hasProperty('enableEmber') && project.getProperty('enableEmber').toBoolean()) {
|
|
|
|
assets project(path: ':datahub-web', configuration: 'assets')
|
|
|
|
} else {
|
|
|
|
assets project(path: ':datahub-web-react', configuration: 'assets')
|
|
|
|
}
|
2021-06-24 23:00:55 -07:00
|
|
|
|
|
|
|
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')
|
2022-05-10 18:15:53 -05:00
|
|
|
play('com.typesafe.akka:akka-actor_2.12:2.5.16')
|
2021-06-24 23:00:55 -07:00
|
|
|
play('net.minidev:json-smart:2.4.1')
|
2022-05-05 16:39:06 -07:00
|
|
|
play('io.netty:netty-all:4.1.68.Final')
|
2021-06-24 23:00:55 -07:00
|
|
|
}
|
2022-05-11 13:32:26 -07:00
|
|
|
compile project(":metadata-service:restli-client")
|
2022-05-10 18:15:53 -05:00
|
|
|
compile project(":metadata-service:auth-api")
|
|
|
|
|
|
|
|
implementation externalDependency.jettyJaas
|
|
|
|
implementation externalDependency.graphqlJava
|
|
|
|
implementation externalDependency.antlr4Runtime
|
|
|
|
implementation externalDependency.antlr4
|
2022-06-06 19:25:24 -05:00
|
|
|
implementation externalDependency.akkaHttp
|
2022-05-10 18:15:53 -05:00
|
|
|
|
|
|
|
implementation externalDependency.jerseyCore
|
|
|
|
implementation externalDependency.jerseyGuava
|
|
|
|
|
2022-06-03 17:32:54 -05:00
|
|
|
implementation(externalDependency.pac4j) {
|
|
|
|
exclude group: "net.minidev", module: "json-smart"
|
2022-06-14 18:36:13 +01:00
|
|
|
exclude group: "com.nimbusds", module: "nimbus-jose-jwt"
|
2022-06-03 17:32:54 -05:00
|
|
|
}
|
2022-06-14 18:36:13 +01:00
|
|
|
implementation "com.nimbusds:nimbus-jose-jwt:7.9"
|
2022-06-03 17:32:54 -05:00
|
|
|
implementation externalDependency.jsonSmart
|
2022-05-10 18:15:53 -05:00
|
|
|
implementation externalDependency.playPac4j
|
|
|
|
implementation externalDependency.shiroCore
|
|
|
|
implementation externalDependency.playCache
|
2022-07-15 00:52:51 +08:00
|
|
|
implementation externalDependency.playEhcache
|
2022-05-10 18:15:53 -05:00
|
|
|
implementation externalDependency.playWs
|
2022-05-31 20:35:23 -04:00
|
|
|
implementation externalDependency.playServer
|
|
|
|
implementation externalDependency.playAkkaHttpServer
|
2022-05-10 18:15:53 -05:00
|
|
|
implementation externalDependency.kafkaClients
|
2022-06-14 14:34:46 -07:00
|
|
|
implementation externalDependency.awsMskIamAuth
|
2022-05-10 18:15:53 -05:00
|
|
|
|
|
|
|
testImplementation externalDependency.mockito
|
|
|
|
testImplementation externalDependency.playTest
|
2022-06-06 15:39:44 -05:00
|
|
|
testCompile externalDependency.testng
|
2022-05-10 18:15:53 -05:00
|
|
|
|
|
|
|
compileOnly externalDependency.lombok
|
|
|
|
runtime externalDependency.guice
|
2022-06-06 19:25:24 -05:00
|
|
|
runtime (externalDependency.playDocs) {
|
|
|
|
exclude group: 'com.typesafe.akka', module: 'akka-http-core_2.12'
|
|
|
|
}
|
2022-05-10 18:15:53 -05:00
|
|
|
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
|
2019-08-31 20:51:14 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
model {
|
|
|
|
components {
|
|
|
|
play {
|
2022-05-10 18:15:53 -05:00
|
|
|
platform play: '2.7.6', scala: '2.12', java: '1.8'
|
2019-08-31 20:51:14 -07:00
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-10-25 22:19:03 -07:00
|
|
|
task unzipAssets(type: Copy, dependsOn: [configurations.assets, ':datahub-web-react:yarnBuild']) {
|
2019-08-31 20:51:14 -07:00
|
|
|
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")
|
2020-07-22 19:43:30 -07:00
|
|
|
}
|
2022-05-10 18:15:53 -05:00
|
|
|
|
|
|
|
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'
|
|
|
|
}
|