-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
71 lines (55 loc) · 2.08 KB
/
build.gradle
File metadata and controls
71 lines (55 loc) · 2.08 KB
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
description = '<h3>Jtest demo project</h3><p>The project contains sample source code with various errors, and bad practice examples which can be detected by Jtest analysis.</p>'
apply plugin: 'java'
apply plugin: 'maven-publish'
group = theGroup
version = theVersion
def jtestPluginPath = projectDir.absolutePath + '/../../integration/gradle/jtest.gradle'
if(file(jtestPluginPath).exists()) {
apply from: jtestPluginPath
} else {
logger.warn('The Jtest tasks cannot be executed from the command line. Please verify if the following file is available: \'../../integration/gradle/jtest.gradle\'')
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
compileJava.options.encoding = 'UTF-8'
test{
// print short tests summary
afterSuite { desc, result ->
if (!desc.parent)
println("Test results: ${result.successfulTestCount} successes, ${result.failedTestCount} failures, ${result.skippedTestCount} skipped")
}
useJUnitPlatform()
// ignore test failures for demo purposes
ignoreFailures = true
// AccountDynamicTest.class is a part of AccountDynamicSuite.class and should not be launched as a separated test
exclude '**/nbank/AccountDynamicTest.class'
exclude '**/*Test*$*.class'
}
buildscript {
repositories {
mavenCentral()
}
}
repositories {
mavenLocal()
mavenCentral()
}
jar {
archiveName = theName + '.jar'
}
dependencies {
implementation 'javax.servlet:servlet-api:2.4'
testImplementation 'org.hamcrest:hamcrest:2.2'
testImplementation 'org.mockito:mockito-junit-jupiter:4.4.0'
testImplementation 'org.mockito:mockito-inline:4.4.0'
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.2'
testImplementation 'org.junit.jupiter:junit-jupiter-migrationsupport:5.8.2'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.8.2'
testImplementation 'org.junit.vintage:junit-vintage-engine:5.8.2'
testImplementation 'pl.pragmatists:JUnitParams:1.1.1'
}
processResources {
from ('src/test/java') {
include '**/*.csv'
}
}