-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
87 lines (75 loc) · 1.96 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
plugins {
id 'java'
id 'jacoco'
id 'org.springframework.boot' version '3.1.5'
id 'io.spring.dependency-management' version '1.1.3'
id 'com.google.cloud.tools.jib' version '3.4.0'
id 'org.sonarqube' version '4.4.1.3373'
}
jacocoTestReport {
reports {
xml.required = true
html.required = true
}
}
sonar {
properties {
property "sonar.projectKey", "petstore"
}
}
group = 'com.example'
version = '0.0.1-SNAPSHOT'
java {
sourceCompatibility = '17'
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0'
implementation 'org.postgresql:postgresql:42.6.0'
runtimeOnly 'com.h2database:h2'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
testImplementation 'org.testcontainers:testcontainers:1.19.1'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
sourceSets {
integrationTest {
java {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
srcDir file('src/test/java')
}
}
}
configurations {
integrationTestCompile.extendsFrom testCompile
integrationTestRuntime.extendsFrom testRuntime
integrationTestImplementation.extendsFrom testImplementation
}
tasks.register('integrationTest', Test) {
// to prevent Mockito's inline mock maker fail on container
jvmArgs('-Djdk.attach.allowAttachSelf=true', '-XX:+StartAttachListener')
description = 'Runs integration tests.'
group = 'verification'
useJUnitPlatform()
filter {
include '**/*IntegrationTest.*'
}
}
tasks.named('test') {
filter {
exclude '**/*IntegrationTest.*'
}
// to prevent Mockito's inline mock maker fail on container
jvmArgs('-Djdk.attach.allowAttachSelf=true', '-XX:+StartAttachListener')
useJUnitPlatform()
finalizedBy jacocoTestReport
}
tasks.named('bootBuildImage') {
imageName = 'com.example/hello'
docker {
host = "/Users/bhuridech/.rd/docker.sock"
}
}