This repository has been archived by the owner on Mar 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle.kts
85 lines (67 loc) · 2.26 KB
/
build.gradle.kts
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
buildscript {
val kotlinVersion = "1.2.71"
extra["kotlinVersion"] = kotlinVersion
val springBootVersion = "1.5.18.RELEASE"
extra["springBootVersion"] = springBootVersion
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion")
classpath(kotlin("gradle-plugin", version = kotlinVersion))
}
}
apply {
plugin("kotlin")
plugin("org.springframework.boot")
}
plugins {
application
}
application {
mainClassName = "io.pivotal.trilogy.application.TrilogyApplication"
}
repositories {
jcenter()
maven { setUrl("http://repository.jetbrains.com/all/") }
}
val oracleBootstrapClasses = "io/pivotal/trilogy/live/oracle/bootstrap/**"
val oracleBootstrap = task<Test>("oracleBootstrap") {
description = "Create common testing objects in an Oracle database"
include(oracleBootstrapClasses)
}
val oracleTests = task<Test>("oracleTests") {
description = "End to end tests against an Oracle database"
dependsOn(oracleBootstrap)
include("io/pivotal/trilogy/live/oracle/**")
exclude(oracleBootstrapClasses)
}
val postgresTests = task<Test>("postgresTests") {
description = "End to end tests against a Postgres database"
include("io/pivotal/trilogy/live/postgres/**")
}
val test = tasks.getByName("test") as Test
test.apply {
exclude("io/pivotal/trilogy/live/**")
}
task<Test>("testAll") {
description = "Run all unit and Oracle end to end tests"
dependsOn(oracleTests, test)
}
configure<JavaPluginConvention> {
setSourceCompatibility(1.7)
setTargetCompatibility(1.7)
}
val kotlinVersion = extra["kotlinVersion"] as String
val springBootVersion = extra["springBootVersion"] as String
dependencies {
compile(kotlin("stdlib", version = kotlinVersion))
compile(kotlin("reflect", version = kotlinVersion))
compile("org.springframework.boot:spring-boot-starter-jdbc")
compile("org.springframework.boot:spring-boot-starter:$springBootVersion")
compile("commons-cli:commons-cli:1.3.1")
compile("org.flywaydb:flyway-core:4.0.3")
testCompile("org.springframework.boot:spring-boot-starter-test")
testCompile("org.jetbrains.spek:spek:1.0.+")
testCompile("org.amshove.kluent:kluent:1.4")
}