-
Notifications
You must be signed in to change notification settings - Fork 32
/
build.gradle
91 lines (77 loc) · 2.73 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
plugins {
id 'org.springframework.boot' version '2.2.0.RELEASE'
id 'io.spring.dependency-management' version '1.0.8.RELEASE'
id 'com.github.ben-manes.versions' version '0.24.0' // gradle dependencyUpdates
id 'java'
id 'eclipse'
id 'idea'
id 'maven'
}
group = 'com.sambrannen'
version = '1.0.0-SNAPSHOT'
sourceCompatibility = 11
targetCompatibility = 11
// Special syntax for overriding spring-boot-dependencies
// https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/2.2.0.RELEASE/spring-boot-dependencies-2.2.0.RELEASE.pom
// ext['junit-jupiter.version'] = '5.5.2'
// ext['spring-security.version'] = '5.2.0.RELEASE'
// ext['spring.version'] = '5.2.0.RELEASE'
repositories {
mavenCentral()
// maven { url 'http://repo.spring.io/snapshot' }
// maven { url 'http://repo.spring.io/milestone' }
}
dependencies {
implementation('org.springframework.boot:spring-boot-starter-data-jpa')
implementation('org.springframework.boot:spring-boot-starter-security')
implementation('org.springframework.boot:spring-boot-starter-web')
runtimeOnly('org.springframework.boot:spring-boot-starter-actuator')
runtimeOnly('org.springframework.boot:spring-boot-starter-thymeleaf')
runtimeOnly('com.fasterxml.jackson.datatype:jackson-datatype-jsr310')
runtimeOnly('com.h2database:h2')
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
testImplementation('org.springframework.security:spring-security-test')
testImplementation('org.junit.jupiter:junit-jupiter-api')
testImplementation('org.junit.platform:junit-platform-runner')
testImplementation('org.testng:testng:7.0.0')
testRuntimeOnly('org.junit.jupiter:junit-jupiter-engine')
}
task junit(type: Test) {
description = 'Runs tests on the JUnit Platform.'
useJUnitPlatform()
testLogging {
// events 'passed', 'skipped', 'failed', 'standardOut', 'standardError'
events 'passed', 'skipped', 'failed'
}
include '**/*Tests.class'
exclude '**/*TestNg*.*'
}
task testNG(type: Test) {
description = 'Runs TestNG tests.'
useTestNG()
testLogging {
// events 'passed', 'skipped', 'failed', 'standardOut', 'standardError'
events 'passed', 'skipped', 'failed'
}
scanForTestClasses = false
include '**/*TestNgTests.class'
// Show STD_OUT & STD_ERR of the test JVM(s) on the console:
// testLogging.showStandardStreams = true
// forkEvery 1
}
test {
description = 'Runs all tests.'
dependsOn junit, testNG
exclude(['**/*.*'])
}
task aggregateTestReports(type: TestReport) {
description = 'Aggregates JUnit and TestNG test reports.'
destinationDir = test.reports.html.destination
reportOn junit, testNG
}
check.dependsOn aggregateTestReports
wrapper {
gradleVersion = '5.6.3'
}