forked from datahub-project/datahub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
play.gradle
67 lines (54 loc) · 1.45 KB
/
play.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
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 {
assets project(path: ':datahub-web', configuration: 'assets')
play project(":datahub-dao")
play externalDependency.jerseyCore
play externalDependency.jerseyGuava
playTest externalDependency.mockito
playTest externalDependency.playTest
playRun externalDependency.guice
playRun externalDependency.playDocs
playRun externalDependency.playGuice
}
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) {
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")
}