-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle
More file actions
121 lines (94 loc) · 3.11 KB
/
build.gradle
File metadata and controls
121 lines (94 loc) · 3.11 KB
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.akhikhl.gretty:gretty:+'
classpath 'com.h2database:h2:1.4.191'
}
}
plugins {
id "org.flywaydb.flyway" version "4.1.2"
id "org.blinkmob.flywayrename" version "1.0.0"
}
apply plugin: 'java'
apply plugin: 'scala'
apply plugin: 'eclipse'
apply plugin: 'war'
apply plugin: 'org.akhikhl.gretty'
def scalaMajor='2.11'
def scalaVersion='2.11.8'
def scalatraVersion='2.4.1'
configurations {
provided
grettyRunnerTomcat8 {
exclude group: 'org.slf4j', module: 'log4j-over-slf4j'
}
}
sourceSets {
main.compileClasspath += configurations.provided
test.compileClasspath += configurations.provided
test.runtimeClasspath += configurations.provided
}
eclipse.classpath.plusConfigurations += [configurations.provided]
flywayMigrate.dependsOn flywayRename
def dbUrl = System.properties["dbUrl"]
def dbUser = System.properties["flyway.dbUser"]
def dbPassword = System.properties["flyway.dbPassword"]
repositories {
mavenCentral()
}
dependencies {
compile "org.scala-lang:scala-library:$scalaVersion"
compile "org.scala-lang:scala-compiler:$scalaVersion"
compile "org.scalatra:scalatra_$scalaMajor:$scalatraVersion"
compile "org.scalatra:scalatra-json_$scalaMajor:$scalatraVersion"
compile "org.scalatra:scalatra-auth_$scalaMajor:$scalatraVersion"
compile "org.json4s:json4s-jackson_$scalaMajor:3.6.0-M1"
compile "org.json4s:json4s-ext_$scalaMajor:3.6.0-M1"
compile "org.blinkmob:scala-tx-provider_$scalaMajor:1.0.1"
compile "com.typesafe:config:1.3.1"
compile group: 'com.zaxxer', name: 'HikariCP-java7', version: '2.4.11'
compile group: 'mysql', name: 'mysql-connector-java', version: '6.0.6'
compile group: 'com.typesafe.play', name: "anorm_$scalaMajor", version: '2.5.3'
compile 'org.slf4j:slf4j-log4j12:1.7.25'
// https://mvnrepository.com/artifact/org.bgee.log4jdbc-log4j2/log4jdbc-log4j2
compile 'org.bgee.log4jdbc-log4j2:log4jdbc-log4j2-jdbc4.1:1.16'
testCompile "junit:junit:4.11"
testCompile "org.specs2:specs2-junit_$scalaMajor:3.6.6"
testCompile "org.scalatra:scalatra-specs2_$scalaMajor:$scalatraVersion"
testCompile "org.specs2:specs2-core_2.11:3.8.5"
testCompile "org.specs2:specs2-junit_2.11:3.8.5"
provided 'javax.servlet:javax.servlet-api:3.1.0'
}
flyway {
schemas = ['PUBLIC']
}
gretty{
servletContainer 'tomcat8'
}
import org.akhikhl.gretty.AppStartTask
task('mAppRun', type: AppStartTask, dependsOn:'prepareInplaceWebApp') {
doFirst {
systemProperties = System.getProperties()
}
}
mAppRun.dependsOn flywayMigrate
war {
archiveName 'dragons.war'
rootSpec.exclude('**/migration/**')
}
test {
dependsOn "flywayMigrate"
doFirst {
systemProperties = System.getProperties()
}
testLogging.showStandardStreams = true
}
task repl(type:JavaExec) {
systemProperties System.properties
main = "scala.tools.nsc.MainGenericRunner"
classpath = sourceSets.main.runtimeClasspath + sourceSets.test.runtimeClasspath
standardInput System.in
args '-usejavacp'
}