-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
89 lines (76 loc) · 2.41 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
86
87
88
89
import org.gradle.kotlin.dsl.*
import org.jetbrains.kotlin.gradle.dsl.Coroutines
import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformJvmPlugin
import org.jetbrains.kotlin.gradle.plugin.KotlinPluginWrapper
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("org.jetbrains.kotlin.jvm") version "1.2.51" apply false
id("io.spring.dependency-management") version "1.0.6.RELEASE"
id("java-library")
id("maven-publish")
id("com.google.cloud.tools.jib") version "0.9.6"
}
apply {
plugin("org.jetbrains.kotlin.jvm")
plugin("java-library")
plugin("io.spring.dependency-management")
}
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
suppressWarnings = false
freeCompilerArgs = listOf("-Xjsr305=strict", "-Xjvm-default=enable")
}
}
repositories {
jcenter()
mavenLocal()
mavenCentral()
maven("https://dl.bintray.com/kotlin/kotlin-eap")
maven("https://kotlin.bintray.com/kotlinx")
}
dependencyManagement {
val awsVersion: String by project
val jacksonVersion: String by project
val slf4jVersion: String by project
imports {
mavenBom("com.amazonaws:aws-java-sdk-bom:$awsVersion")
mavenBom("com.fasterxml.jackson:jackson-bom:$jacksonVersion")
mavenBom("org.slf4j:slf4j-parent:$slf4jVersion")
}
val junitVersion: String by project
val mockitoKotlinVersion: String by project
dependencies {
dependency("org.junit.jupiter:junit-jupiter-api:$junitVersion")
dependency("org.junit.jupiter:junit-jupiter-params:$junitVersion")
dependency("org.junit.jupiter:junit-jupiter-engine:$junitVersion")
dependency("com.nhaarman.mockitokotlin2:mockito-kotlin:$mockitoKotlinVersion")
dependency("org.slf4j:slf4j-api:$slf4jVersion")
dependency("org.slf4j:slf4j-log4j12:$slf4jVersion")
}
}
tasks.withType<Test> {
//systemProperty("AWS_PROFILE", System.getenv("AWS_PROFILE"))
useJUnitPlatform {
val includeTag: String = when {
project.hasProperty("runIntegrationTests") -> "slow"
else -> "fast"
}
includeTags(includeTag)
}
testLogging {
events("passed", "skipped", "failed")
}
}
dependencies {
val sparkKotlinVersion: String by project
api("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
compile("com.fasterxml.jackson.module:jackson-module-kotlin")
compile("com.sparkjava:spark-kotlin:$sparkKotlinVersion")
compile("org.slf4j:slf4j-log4j12")
}
jib {
to {
image = "${project.name}:${project.version}"
}
}