summaryrefslogtreecommitdiff
path: root/simulator/buildSrc/src/main
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2021-02-23 11:15:04 +0100
committerFabian Mastenbroek <mail.fabianm@gmail.com>2021-02-23 11:28:08 +0100
commit129a86fa562b50c9ca43579dfd598596567dae53 (patch)
tree09088e5beeaf92e9e4131385a6229f77887d2450 /simulator/buildSrc/src/main
parentef83b0ff68f023a64a7e3446b23e4a6f02aca841 (diff)
Extract Jacoco convention from Kotlin library convention
This commit extracts the configuration for Jacoco into a separate convention file.
Diffstat (limited to 'simulator/buildSrc/src/main')
-rw-r--r--simulator/buildSrc/src/main/kotlin/jacoco-convention.gradle.kts58
-rw-r--r--simulator/buildSrc/src/main/kotlin/kotlin-library-convention.gradle.kts12
2 files changed, 58 insertions, 12 deletions
diff --git a/simulator/buildSrc/src/main/kotlin/jacoco-convention.gradle.kts b/simulator/buildSrc/src/main/kotlin/jacoco-convention.gradle.kts
new file mode 100644
index 00000000..544e34bf
--- /dev/null
+++ b/simulator/buildSrc/src/main/kotlin/jacoco-convention.gradle.kts
@@ -0,0 +1,58 @@
+import org.gradle.kotlin.dsl.`java-library`
+import org.gradle.kotlin.dsl.jacoco
+import org.gradle.kotlin.dsl.kotlin
+
+/*
+ * Copyright (c) 2021 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.
+ */
+
+/*
+ * Copyright (c) 2021 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.
+ */
+
+plugins {
+ `java-library`
+ jacoco
+}
+
+tasks.jacocoTestReport {
+ reports {
+ html.isEnabled = true
+ }
+}
diff --git a/simulator/buildSrc/src/main/kotlin/kotlin-library-convention.gradle.kts b/simulator/buildSrc/src/main/kotlin/kotlin-library-convention.gradle.kts
index f9d8a966..405235f0 100644
--- a/simulator/buildSrc/src/main/kotlin/kotlin-library-convention.gradle.kts
+++ b/simulator/buildSrc/src/main/kotlin/kotlin-library-convention.gradle.kts
@@ -28,7 +28,6 @@ plugins {
`java-library`
kotlin("jvm")
id("org.jlleitschuh.gradle.ktlint")
- jacoco
}
/* Project configuration */
@@ -45,10 +44,6 @@ kotlin {
explicitApi()
}
-jacoco {
- toolVersion = "0.8.6"
-}
-
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
@@ -58,10 +53,3 @@ tasks.test {
useJUnitPlatform()
reports.html.isEnabled = true
}
-
-
-tasks.jacocoTestReport {
- reports {
- html.isEnabled = true
- }
-}