diff options
Diffstat (limited to 'simulator/buildSrc')
| -rw-r--r-- | simulator/buildSrc/build.gradle.kts | 21 | ||||
| -rw-r--r-- | simulator/buildSrc/settings.gradle.kts | 4 | ||||
| -rw-r--r-- | simulator/buildSrc/src/main/kotlin/Versions.kt (renamed from simulator/buildSrc/src/main/kotlin/library.kt) | 5 | ||||
| -rw-r--r-- | simulator/buildSrc/src/main/kotlin/dokka-conventions.gradle.kts (renamed from simulator/buildSrc/src/main/kotlin/dokka-convention.gradle.kts) | 0 | ||||
| -rw-r--r-- | simulator/buildSrc/src/main/kotlin/jacoco-conventions.gradle.kts (renamed from simulator/buildSrc/src/main/kotlin/jacoco-convention.gradle.kts) | 0 | ||||
| -rw-r--r-- | simulator/buildSrc/src/main/kotlin/kotlin-library-conventions.gradle.kts (renamed from simulator/buildSrc/src/main/kotlin/kotlin-library-convention.gradle.kts) | 5 | ||||
| -rw-r--r-- | simulator/buildSrc/src/main/kotlin/testing-conventions.gradle.kts | 38 |
7 files changed, 54 insertions, 19 deletions
diff --git a/simulator/buildSrc/build.gradle.kts b/simulator/buildSrc/build.gradle.kts index e1f538fe..452c07cd 100644 --- a/simulator/buildSrc/build.gradle.kts +++ b/simulator/buildSrc/build.gradle.kts @@ -1,7 +1,5 @@ /* - * MIT License - * - * Copyright (c) 2019 atlarge-research + * Copyright (c) 2019 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 @@ -22,21 +20,16 @@ * SOFTWARE. */ +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + plugins { `kotlin-dsl` } -kotlinDslPluginOptions { - experimentalWarning.set(false) -} - - /* Project configuration */ repositories { jcenter() - maven { - url = uri("https://plugins.gradle.org/m2/") - } + gradlePluginPortal() } dependencies { @@ -44,3 +37,9 @@ dependencies { implementation("org.jlleitschuh.gradle:ktlint-gradle:10.0.0") implementation("org.jetbrains.dokka:dokka-gradle-plugin:0.10.1") } + +tasks.withType<KotlinCompile>().configureEach { + kotlinOptions { + allWarningsAsErrors = true + } +} diff --git a/simulator/buildSrc/settings.gradle.kts b/simulator/buildSrc/settings.gradle.kts index cc3f3add..5337ee96 100644 --- a/simulator/buildSrc/settings.gradle.kts +++ b/simulator/buildSrc/settings.gradle.kts @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2019 atlarge-research + * Copyright (c) 2019 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 @@ -21,3 +21,5 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ + +/* Intentionally left blank */ diff --git a/simulator/buildSrc/src/main/kotlin/library.kt b/simulator/buildSrc/src/main/kotlin/Versions.kt index a66e5f46..d845c4bd 100644 --- a/simulator/buildSrc/src/main/kotlin/library.kt +++ b/simulator/buildSrc/src/main/kotlin/Versions.kt @@ -23,10 +23,11 @@ */ /** - * This object contains the versions of the dependencies shared by the different + * This class contains the versions of the dependencies shared by the different * subprojects. */ -object Library { +public object Versions { + /** * The library for testing the projects. */ diff --git a/simulator/buildSrc/src/main/kotlin/dokka-convention.gradle.kts b/simulator/buildSrc/src/main/kotlin/dokka-conventions.gradle.kts index 95183df2..95183df2 100644 --- a/simulator/buildSrc/src/main/kotlin/dokka-convention.gradle.kts +++ b/simulator/buildSrc/src/main/kotlin/dokka-conventions.gradle.kts diff --git a/simulator/buildSrc/src/main/kotlin/jacoco-convention.gradle.kts b/simulator/buildSrc/src/main/kotlin/jacoco-conventions.gradle.kts index 544e34bf..544e34bf 100644 --- a/simulator/buildSrc/src/main/kotlin/jacoco-convention.gradle.kts +++ b/simulator/buildSrc/src/main/kotlin/jacoco-conventions.gradle.kts diff --git a/simulator/buildSrc/src/main/kotlin/kotlin-library-convention.gradle.kts b/simulator/buildSrc/src/main/kotlin/kotlin-library-conventions.gradle.kts index 405235f0..b07267d2 100644 --- a/simulator/buildSrc/src/main/kotlin/kotlin-library-convention.gradle.kts +++ b/simulator/buildSrc/src/main/kotlin/kotlin-library-conventions.gradle.kts @@ -48,8 +48,3 @@ tasks.withType<KotlinCompile>().configureEach { kotlinOptions.jvmTarget = "1.8" kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn" } - -tasks.test { - useJUnitPlatform() - reports.html.isEnabled = true -} diff --git a/simulator/buildSrc/src/main/kotlin/testing-conventions.gradle.kts b/simulator/buildSrc/src/main/kotlin/testing-conventions.gradle.kts new file mode 100644 index 00000000..5a19bfe0 --- /dev/null +++ b/simulator/buildSrc/src/main/kotlin/testing-conventions.gradle.kts @@ -0,0 +1,38 @@ +import org.gradle.kotlin.dsl.`java-library` +import org.gradle.kotlin.dsl.kotlin +import org.gradle.platform.base.Library + +/* + * 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` +} + +tasks.test { + useJUnitPlatform() +} + +dependencies { + testImplementation("org.junit.jupiter:junit-jupiter-api:${Versions.JUNIT_JUPITER}") + testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${Versions.JUNIT_JUPITER}") +} |
