Added gradle build for testing
This commit is contained in:
parent
164bc50089
commit
2eb6bac66b
11 changed files with 431 additions and 12 deletions
43
examples/build.gradle.kts
Normal file
43
examples/build.gradle.kts
Normal file
|
@ -0,0 +1,43 @@
|
|||
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
|
||||
import org.gradle.api.tasks.testing.logging.TestLogEvent
|
||||
|
||||
plugins {
|
||||
// Apply the java-library plugin for API and implementation separation.
|
||||
`java-library`
|
||||
`jacoco`
|
||||
}
|
||||
|
||||
repositories {
|
||||
// Use Maven Central for resolving dependencies.
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation("org.junit.jupiter", "junit-jupiter", "5.9.2")
|
||||
testImplementation("org.junit.platform", "junit-platform-console-standalone", "1.9.2")
|
||||
}
|
||||
|
||||
// Apply a specific Java toolchain to ease working on different environments.
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion.set(JavaLanguageVersion.of(17))
|
||||
}
|
||||
}
|
||||
|
||||
tasks {
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
testLogging {
|
||||
exceptionFormat = TestExceptionFormat.FULL
|
||||
events = setOf(TestLogEvent.PASSED, TestLogEvent.SKIPPED, TestLogEvent.FAILED)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.jacocoTestReport {
|
||||
reports {
|
||||
xml.required.set(true)
|
||||
csv.required.set(true)
|
||||
html.required.set(true)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue