-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
79 lines (67 loc) · 2.28 KB
/
build.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
68
69
70
71
72
73
74
75
76
77
78
79
plugins {
id 'play'
id 'idea'
}
def playVersion = "2.7.0"
def scalaVersion = System.getProperty("scala.binary.version", /* default = */ "2.12")
model {
components {
play {
platform play: playVersion, scala: scalaVersion, java: '1.8'
injectedRoutesGenerator = true
sources {
twirlTemplates {
defaultImports = TwirlImports.SCALA
}
}
}
}
}
// EXAMPLE: How to add parameter to Scala compiler
// Another option is documented here:
// https://docs.gradle.org/current/userguide/play_plugin.html#sec:configuring_compiler_options
//
// See other configurations for ScalaCompile task here:
// https://docs.gradle.org/current/dsl/org.gradle.api.tasks.scala.ScalaCompile.html
//
// tasks.withType(ScalaCompile) {
// scalaCompileOptions.additionalParameters = [
// "-deprecation",
// "-verbose"
// ]
// }
// EXAMPLE: How to add JVM parameters when running `runPlayBinary`.
// See other configurations for PlayRun here:
// https://docs.gradle.org/current/dsl/org.gradle.play.tasks.PlayRun.html
//
// tasks.withType(PlayRun) {
// forkOptions.jvmArgs = ['-Dplay.http.secret.key=yadayada']
// }
// EXAMPLE: How to add JVM parameters to the script created by `stage`.
// See more details here:
// https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/application/CreateStartScripts.html
//
// tasks.withType(CreateStartScripts) {
// defaultJvmOpts = ['-Dplay.http.secret.key=yadayada']
// }
def dependencyFor(String lib, String scalaVersion, String version) {
return lib + "_" + scalaVersion + ":" + version
}
dependencies {
play dependencyFor("com.typesafe.play:play-guice", scalaVersion, playVersion)
play dependencyFor("com.typesafe.play:play-logback", scalaVersion, playVersion)
play dependencyFor("com.typesafe.play:filters-helpers", scalaVersion, playVersion)
playTest dependencyFor("org.scalatestplus.play:scalatestplus-play", scalaVersion, "4.0.1")
}
repositories {
jcenter()
maven {
name "lightbend-maven-releases"
url "https://repo.lightbend.com/lightbend/maven-release"
}
ivy {
name "lightbend-ivy-release"
url "https://repo.lightbend.com/lightbend/ivy-releases"
layout "ivy"
}
}