-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
102 lines (88 loc) · 2.3 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
plugins {
id 'java'
id 'jacoco'
id 'java-library'
}
group 'com.surrealdb'
version '0.2-SNAPSHOT'
repositories {
mavenCentral()
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
sourceSets {
integrationTest {
java
}
}
configurations {
integrationTestImplementation.extendsFrom testImplementation
integrationTestRuntimeOnly.extendsFrom testRuntimeOnly
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2'
integrationTestImplementation files("build/libs/surrealdb-jni-0.2-SNAPSHOT.jar")
}
jacoco {
toolVersion = "0.8.12"
}
test {
useJUnitPlatform()
systemProperty 'java.library.path', file('target/debug').absolutePath
testLogging {
events "passed"
}
}
jacocoTestReport {
dependsOn test
// finalizedBy jacocoTestCoverageVerification
}
//jacocoTestCoverageVerification {
// violationRules {
// rule {
// limit {
// minimum = 0.7
// }
// }
// }
//}
javadoc {
destinationDir = file("build/reports/javadoc")
}
tasks.register('createCombinedReport') {
dependsOn jacocoTestReport
dependsOn javadoc
doLast {
def indexFile = file("build/reports/index.html")
indexFile.text = """
<!DOCTYPE html>
<html>
<head>
<title>Combined Test, Coverage, and Javadoc Report</title>
</head>
<body>
<h1>Combined Test, Coverage, and Javadoc Report</h1>
<ul>
<li><a href="./tests/test/index.html">Test Report</a></li>
<li><a href="./jacoco/test/html/index.html">JaCoCo Coverage Report</a></li>
<li><a href="./javadoc/index.html">Javadoc</a></li>
</ul>
</body>
</html>
"""
}
}
tasks.register('integrationTest', Test) {
useJUnitPlatform()
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
testLogging {
showStandardStreams = true
events "passed", "skipped", "failed", "standardOut", "standardError"
exceptionFormat = 'full'
showCauses = true
showStackTraces = true
}
}