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
|
2022-12-08 20:27:51 -06:00
|
|
|
play
|
2019-08-31 20:51:14 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2022-09-04 22:42:09 -07:00
|
|
|
assets project(path: ':datahub-web-react', configuration: 'assets')
|
2021-06-24 23:00:55 -07:00
|
|
|
|
|
|
|
constraints {
|
2022-12-08 20:27:51 -06:00
|
|
|
play(externalDependency.springCore)
|
|
|
|
play(externalDependency.springBeans)
|
|
|
|
play(externalDependency.springContext)
|
2022-12-01 16:43:15 -06:00
|
|
|
play(externalDependency.jacksonDataBind)
|
2022-12-08 20:27:51 -06:00
|
|
|
play('com.nimbusds:oauth2-oidc-sdk:8.36.2')
|
|
|
|
play('com.nimbusds:nimbus-jose-jwt:8.18')
|
|
|
|
play('com.typesafe.akka:akka-actor_2.12:2.6.20')
|
|
|
|
play('net.minidev:json-smart:2.4.8')
|
|
|
|
play('io.netty:netty-all:4.1.85.Final')
|
2022-12-09 14:11:12 -06:00
|
|
|
implementation(externalDependency.commonsText) {
|
|
|
|
because("previous versions are vulnerable to CVE-2022-42889")
|
|
|
|
}
|
2021-06-24 23:00:55 -07:00
|
|
|
}
|
2022-12-08 20:27:51 -06: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")
|
|
|
|
|
2022-12-08 20:27:51 -06:00
|
|
|
|
2022-05-10 18:15:53 -05:00
|
|
|
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-12-08 20:27:51 -06:00
|
|
|
|
|
|
|
implementation 'com.nimbusds:nimbus-jose-jwt:8.18'
|
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-12-08 20:27:51 -06:00
|
|
|
implementation externalDependency.playFilters
|
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-12-08 20:27:51 -06:00
|
|
|
testImplementation 'no.nav.security:mock-oauth2-server:0.3.1'
|
|
|
|
testImplementation 'org.junit-pioneer:junit-pioneer:1.9.1'
|
|
|
|
testImplementation externalDependency.junitJupiterApi
|
|
|
|
testRuntime externalDependency.junitJupiterEngine
|
2022-05-10 18:15:53 -05:00
|
|
|
|
2022-12-04 21:57:47 -06:00
|
|
|
implementation externalDependency.slf4jApi
|
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
|
2022-12-08 20:27:51 -06:00
|
|
|
implementation externalDependency.log4j2Api
|
|
|
|
|
2022-12-04 21:57:47 -06:00
|
|
|
implementation externalDependency.logbackClassic
|
2022-05-10 18:15:53 -05:00
|
|
|
|
|
|
|
annotationProcessor externalDependency.lombok
|
|
|
|
}
|
|
|
|
|
|
|
|
dist.dependsOn(':datahub-web-react:copyAssets')
|
2022-12-08 20:27:51 -06:00
|
|
|
test.dependsOn(':datahub-frontend:testResources')
|
2022-05-10 18:15:53 -05:00
|
|
|
|
|
|
|
play {
|
|
|
|
platform {
|
2022-12-08 20:27:51 -06:00
|
|
|
playVersion = '2.8.18'
|
2022-05-10 18:15:53 -05:00
|
|
|
scalaVersion = '2.12'
|
2022-10-04 15:37:28 -07:00
|
|
|
javaVersion = JavaVersion.VERSION_11
|
2022-05-10 18:15:53 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
injectedRoutesGenerator = true
|
2019-08-31 20:51:14 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
model {
|
|
|
|
components {
|
|
|
|
play {
|
2022-12-08 20:27:51 -06:00
|
|
|
platform play: '2.8.18', scala: '2.12', java: '11'
|
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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-12-08 20:27:51 -06:00
|
|
|
test {
|
|
|
|
useJUnitPlatform()
|
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
test {
|
|
|
|
resources {
|
|
|
|
srcDirs = ['test/resources']
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// minimal files for low-level tests
|
|
|
|
task testResources {
|
|
|
|
copy {
|
|
|
|
from '../datahub-web-react/public'
|
|
|
|
into 'test/resources/public'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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'
|
2022-12-08 20:27:51 -06:00
|
|
|
delete 'test/resources/public'
|
2022-05-10 18:15:53 -05:00
|
|
|
}
|