prog2-lab04-it21bwin-romans.../code/Herzschlag/build.gradle

75 lines
2.4 KiB
Groovy
Raw Permalink Normal View History

2022-04-27 12:00:50 +02:00
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java application project to get you started.
* For more details take a look at the 'Building Java & JVM projects' chapter in the Gradle
* User Manual available at https://docs.gradle.org/7.2/userguide/building_java_projects.html
*/
plugins {
// Apply the application plugin to add support for building a CLI application in Java.
id 'application'
}
repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
}
dependencies {
// Junit 5 dependencies
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.+'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.8.+'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.+'
// Mockito dependencies
testImplementation 'org.mockito:mockito-core:4.3.+'
}
// Test task configuration
test {
// Use JUnit platform for unit tests
useJUnitPlatform()
// Output results of individual tests
testLogging {
events "PASSED", "SKIPPED", "FAILED"
}
}
application {
// Define the main class for the application.
mainClass = 'ch.zhaw.prog2.heartbeat.Heart'
}
// Java plugin configuration
java {
// By default the Java version of the gradle process is used as source/target version.
// This can be overridden, to ensure a specific version. Enable only if required.
// sourceCompatibility = JavaVersion.VERSION_17 // ensure Java source code compatibility
// targetCompatibility = JavaVersion.VERSION_17 // version of the created byte-code
// Java compiler specific options
compileJava {
// source files should be UTF-8 encoded
options.encoding = 'UTF-8'
// for more options see https://docs.gradle.org/current/dsl/org.gradle.api.tasks.compile.CompileOptions.html
}
}
task autograding(type: Test) {
description = "Runs specific tests for autograding"
group = 'verification'
useJUnitPlatform()
testLogging {
events "PASSED", "SKIPPED", "FAILED"
}
filter {
failOnNoMatchingTests true
includeTestsMatching "PacemakerTest"
includeTestsMatching "HeartTest.testExecuteHartBeatErrorBehaviourWithStubbing"
includeTestsMatching "HeartTest.testValvesBehavior"
includeTestsMatching "HeartTest.testDiastoleException"
includeTestsMatching "HeartTest.testSystoleException"
}
}