-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
130 lines (104 loc) · 3.49 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
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
121
122
123
124
125
126
127
128
129
130
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
}
plugins {
id "org.jetbrains.kotlin.jvm" version "$kotlinVersion"
id "org.jetbrains.kotlin.plugin.spring" version "$kotlinVersion"
id 'org.springframework.boot' version '2.7.4'
id "io.spring.dependency-management" version "1.0.14.RELEASE"
id 'idea'
id "com.google.protobuf" version "0.9.1"
id 'com.google.cloud.tools.jib' version "3.3.0"
}
sourceSets {
intTest {
compileClasspath += sourceSets.main.output + test.output
runtimeClasspath += sourceSets.main.output + test.output
kotlin.srcDir "$projectDir/src/intTest/kotlin"
resources.srcDir "$projectDir/src/intTest/resources"
}
}
configurations {
intTestImplementation.extendsFrom testImplementation
intTestRuntimeOnly.extendsFrom testRuntimeOnly
}
group = 'org.example'
version = '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
implementation("com.fasterxml.jackson.core:jackson-core:$jackson_version")
implementation("com.fasterxml.jackson.core:jackson-databind:$jackson_version")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jdk8:$jackson_version")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jackson_version")
implementation("org.springframework.boot:spring-boot-starter")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("com.datastax.oss:java-driver-core:$cassandraVersion")
implementation("com.datastax.oss:java-driver-query-builder:$cassandraVersion")
implementation("com.hazelcast:hazelcast:$hazelcastVersion")
implementation("com.google.protobuf:protobuf-java:$protobufVersion")
protobuf(files("./proto"))
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: jUnitVersion
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: jUnitVersion
testImplementation 'org.jetbrains.kotlin:kotlin-test'
intTestImplementation('org.springframework.boot:spring-boot-starter-test')
}
test {
useJUnitPlatform()
dependsOn "cleanTest"
}
compileKotlin {
kotlinOptions.jvmTarget = '11'
}
compileTestKotlin {
kotlinOptions.jvmTarget = '11'
}
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:$protobufVersion"
}
}
task integrationTest(type: Test) {
description = 'Runs integration tests.'
group = 'verification'
useJUnitPlatform()
testClassesDirs = sourceSets.intTest.output.classesDirs
classpath = sourceSets.intTest.runtimeClasspath
shouldRunAfter test
}
tasks.named("processIntTestResources") {
duplicatesStrategy = 'include'
}
tasks {
bootJar {
mainClass.set('org.example.hz.ApplicationKt')
archiveFileName.set('hz-example.jar')
}
}
idea {
module {
testSourceDirs += project.sourceSets.intTest.kotlin.srcDirs
testResourceDirs += project.sourceSets.intTest.resources.srcDirs
generatedSourceDirs.add(file('build/generated/source/proto/main'))
}
}
jib {
from {
image = 'gcr.io/distroless/java:11'
}
to {
image = "test/teams-service"
tags = ["latest"]
}
container {
mainClass = 'org.example.hz.ApplicationKt'
ports = ['8080', '5701']
}
}