forked from playframework/play-java-rest-api-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
70 lines (60 loc) · 1.79 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
plugins {
id 'play'
id 'idea'
id "com.github.lkishalmi.gatling" version "0.7.1"
}
def playVersion = "2.6.13"
def scalaVersion = System.getProperty("scala.binary.version", /* default = */ "2.12")
def gatlingVersion = getGlatlingVersion(scalaVersion)
// Gatling 2.3.0 works for Scala 2.12
// Gatling 2.2.5 works for Scala 2.11
String getGlatlingVersion(String scalaVer) {
if (scalaVer == "2.12") "2.3.0" else "2.2.5"
}
model {
components {
play {
platform play: playVersion, scala: scalaVersion, java: '1.8'
injectedRoutesGenerator = true
sources {
twirlTemplates {
defaultImports = TwirlImports.JAVA
}
}
}
}
}
project.sourceSets {
gatling {
scala.srcDirs = ["gatling"]
}
}
gatling {
sourceRoot = "gatling"
simulationsDir = "gatling"
toolVersion = gatlingVersion
}
dependencies {
play "com.typesafe.play:play-guice_$scalaVersion:$playVersion"
play "com.typesafe.play:play-logback_$scalaVersion:$playVersion"
play "com.typesafe.play:play-java-jpa_$scalaVersion:$playVersion"
play "com.h2database:h2:1.4.196"
play "org.hibernate:hibernate-core:5.2.9.Final"
play "io.dropwizard.metrics:metrics-core:3.2.1"
play "com.palominolabs.http:url-builder:1.1.0"
play "net.jodah:failsafe:1.0.3"
playTest "io.gatling.highcharts:gatling-charts-highcharts:$gatlingVersion"
playTest "io.gatling:gatling-test-framework:$gatlingVersion"
}
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"
}
}