From f682ea3c1a4791f8515f4924acbc1213d17dce29 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Wed, 11 Jul 2018 16:19:30 +0200 Subject: chore: Update Gradle wrapper version This change updates the Gradle wrapper version included in the repository to version 4.8 which includes native JUnit 5 integration. --- gradle/wrapper/gradle-wrapper.jar | Bin 54788 -> 54413 bytes gradle/wrapper/gradle-wrapper.properties | 11 +++++------ 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'gradle') diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 24dcc970..1948b907 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 5c2e2870..d2c45a4b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Tue Aug 29 14:12:50 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-rc-2-all.zip +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-4.8-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists -- cgit v1.2.3 From c5f88cc28f9d27f867247a713605368c558795a0 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Wed, 11 Jul 2018 16:42:26 +0200 Subject: chore: Update Gradle build configuration This change updates the Gradle build configuration in order to make use of the native JUnit 5 integration and the newest Kotlin and Dokka plugins. --- gradle/kotlin.gradle | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 gradle/kotlin.gradle (limited to 'gradle') diff --git a/gradle/kotlin.gradle b/gradle/kotlin.gradle new file mode 100644 index 00000000..7fd45326 --- /dev/null +++ b/gradle/kotlin.gradle @@ -0,0 +1,64 @@ +/* + * MIT License + * + * Copyright (c) 2017 atlarge-research + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/* Default configuration for Kotlin projects */ +apply plugin: 'kotlin' +apply plugin: 'org.jetbrains.dokka' + +sourceCompatibility = 1.8 + +compileKotlin { + kotlinOptions { + jvmTarget = "1.8" + } +} + +compileTestKotlin { + kotlinOptions { + jvmTarget = "1.8" + } +} + +kotlin { + experimental { + coroutines "enable" + } +} + +/* Configure test setup */ +test { + useJUnitPlatform {} + + testLogging { + events 'passed', 'skipped', 'failed' + } + + reports { + html.enabled = true + } +} + +/* Documentation generation */ +dokka {} + -- cgit v1.2.3 From 8c7e208233c86614ac29157efba24e3a57d7f21c Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Wed, 11 Jul 2018 17:15:44 +0200 Subject: chore: Add support for Jacoco This change adds support for Jacoco in the build toolchain. --- gradle/kotlin.gradle | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'gradle') diff --git a/gradle/kotlin.gradle b/gradle/kotlin.gradle index 7fd45326..04f67ae8 100644 --- a/gradle/kotlin.gradle +++ b/gradle/kotlin.gradle @@ -25,6 +25,7 @@ /* Default configuration for Kotlin projects */ apply plugin: 'kotlin' apply plugin: 'org.jetbrains.dokka' +apply plugin: 'jacoco' sourceCompatibility = 1.8 @@ -57,6 +58,26 @@ test { reports { html.enabled = true } + + finalizedBy jacocoTestReport +} + +/* Coverage */ +repositories { + // This repository is needed to get the latest snapshot of Jacoco + maven { url = "https://oss.sonatype.org/content/repositories/snapshots" } +} + +jacoco { + // We use the latest snapshot of Jacoco in order to get it to ignore Kotlin-generated code + toolVersion = jacoco_version +} + +jacocoTestReport { + reports { + html.enabled = true + xml.enabled = true + } } /* Documentation generation */ -- cgit v1.2.3