From ef83b0ff68f023a64a7e3446b23e4a6f02aca841 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Tue, 23 Feb 2021 10:53:42 +0100 Subject: Remove unnecessary dependencies on JUnit Platform Launcher This change removes unnecessary dependencies on JUnit Platform launcher from the repository. Previously, the launcher was used to bootstrap tests for Gradle when it did not natively support JUnit Platform. Gradle now has native support for JUnit Platform, so the dependency is not needed anymore. --- simulator/opendc-compute/opendc-compute-core/build.gradle.kts | 1 - simulator/opendc-compute/opendc-compute-simulator/build.gradle.kts | 1 - 2 files changed, 2 deletions(-) (limited to 'simulator/opendc-compute') diff --git a/simulator/opendc-compute/opendc-compute-core/build.gradle.kts b/simulator/opendc-compute/opendc-compute-core/build.gradle.kts index ac2dc78d..35a737f0 100644 --- a/simulator/opendc-compute/opendc-compute-core/build.gradle.kts +++ b/simulator/opendc-compute/opendc-compute-core/build.gradle.kts @@ -38,5 +38,4 @@ dependencies { testRuntimeOnly("org.slf4j:slf4j-simple:${Library.SLF4J}") testImplementation("org.junit.jupiter:junit-jupiter-api:${Library.JUNIT_JUPITER}") testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${Library.JUNIT_JUPITER}") - testImplementation("org.junit.platform:junit-platform-launcher:${Library.JUNIT_PLATFORM}") } diff --git a/simulator/opendc-compute/opendc-compute-simulator/build.gradle.kts b/simulator/opendc-compute/opendc-compute-simulator/build.gradle.kts index dc93e956..0e0fba60 100644 --- a/simulator/opendc-compute/opendc-compute-simulator/build.gradle.kts +++ b/simulator/opendc-compute/opendc-compute-simulator/build.gradle.kts @@ -38,5 +38,4 @@ dependencies { testRuntimeOnly("org.slf4j:slf4j-simple:${Library.SLF4J}") testImplementation("org.junit.jupiter:junit-jupiter-api:${Library.JUNIT_JUPITER}") testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${Library.JUNIT_JUPITER}") - testImplementation("org.junit.platform:junit-platform-launcher:${Library.JUNIT_PLATFORM}") } -- cgit v1.2.3 From 0b092b352dc29ce69f6f126eb7857a1243a6ef62 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Tue, 23 Feb 2021 11:46:06 +0100 Subject: Extract testing conventions from Kotlin conventions This change extracts the configuration for test from the Kotlin library conventions. --- simulator/opendc-compute/opendc-compute-core/build.gradle.kts | 8 +------- .../opendc-compute/opendc-compute-simulator/build.gradle.kts | 7 +++---- 2 files changed, 4 insertions(+), 11 deletions(-) (limited to 'simulator/opendc-compute') diff --git a/simulator/opendc-compute/opendc-compute-core/build.gradle.kts b/simulator/opendc-compute/opendc-compute-core/build.gradle.kts index 35a737f0..39a146ab 100644 --- a/simulator/opendc-compute/opendc-compute-core/build.gradle.kts +++ b/simulator/opendc-compute/opendc-compute-core/build.gradle.kts @@ -24,7 +24,7 @@ description = "Core implementation of the OpenDC Compute service" /* Build configuration */ plugins { - `kotlin-library-convention` + `kotlin-library-conventions` } dependencies { @@ -32,10 +32,4 @@ dependencies { api(project(":opendc-trace:opendc-trace-core")) implementation(project(":opendc-utils")) implementation("io.github.microutils:kotlin-logging:1.7.9") - - testImplementation(project(":opendc-simulator:opendc-simulator-core")) - testImplementation(project(":opendc-compute:opendc-compute-simulator")) - testRuntimeOnly("org.slf4j:slf4j-simple:${Library.SLF4J}") - testImplementation("org.junit.jupiter:junit-jupiter-api:${Library.JUNIT_JUPITER}") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${Library.JUNIT_JUPITER}") } diff --git a/simulator/opendc-compute/opendc-compute-simulator/build.gradle.kts b/simulator/opendc-compute/opendc-compute-simulator/build.gradle.kts index 0e0fba60..606223c6 100644 --- a/simulator/opendc-compute/opendc-compute-simulator/build.gradle.kts +++ b/simulator/opendc-compute/opendc-compute-simulator/build.gradle.kts @@ -24,7 +24,8 @@ description = "Simulator for OpenDC Compute" /* Build configuration */ plugins { - `kotlin-library-convention` + `kotlin-library-conventions` + `testing-conventions` } dependencies { @@ -35,7 +36,5 @@ dependencies { implementation("io.github.microutils:kotlin-logging:1.7.9") testImplementation(project(":opendc-simulator:opendc-simulator-core")) - testRuntimeOnly("org.slf4j:slf4j-simple:${Library.SLF4J}") - testImplementation("org.junit.jupiter:junit-jupiter-api:${Library.JUNIT_JUPITER}") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${Library.JUNIT_JUPITER}") + testRuntimeOnly("org.slf4j:slf4j-simple:${Versions.SLF4J}") } -- cgit v1.2.3 From 90de768b8bfb3acc222f508d2e602ef3b7f1ff91 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Tue, 23 Feb 2021 12:05:59 +0100 Subject: Move dependency versions to gradle.properties This change moves the version of the dependencies from buildSrc to gradle.properties to prevent recompilation when changing dependency versions. --- simulator/opendc-compute/opendc-compute-core/build.gradle.kts | 2 +- simulator/opendc-compute/opendc-compute-simulator/build.gradle.kts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'simulator/opendc-compute') diff --git a/simulator/opendc-compute/opendc-compute-core/build.gradle.kts b/simulator/opendc-compute/opendc-compute-core/build.gradle.kts index 39a146ab..c6d254d1 100644 --- a/simulator/opendc-compute/opendc-compute-core/build.gradle.kts +++ b/simulator/opendc-compute/opendc-compute-core/build.gradle.kts @@ -31,5 +31,5 @@ dependencies { api(project(":opendc-core")) api(project(":opendc-trace:opendc-trace-core")) implementation(project(":opendc-utils")) - implementation("io.github.microutils:kotlin-logging:1.7.9") + implementation("io.github.microutils:kotlin-logging:${versions.kotlinLogging}") } diff --git a/simulator/opendc-compute/opendc-compute-simulator/build.gradle.kts b/simulator/opendc-compute/opendc-compute-simulator/build.gradle.kts index 606223c6..00fdd780 100644 --- a/simulator/opendc-compute/opendc-compute-simulator/build.gradle.kts +++ b/simulator/opendc-compute/opendc-compute-simulator/build.gradle.kts @@ -33,8 +33,8 @@ dependencies { api(project(":opendc-simulator:opendc-simulator-compute")) api(project(":opendc-simulator:opendc-simulator-failures")) implementation(project(":opendc-utils")) - implementation("io.github.microutils:kotlin-logging:1.7.9") + implementation("io.github.microutils:kotlin-logging:${versions.kotlinLogging}") testImplementation(project(":opendc-simulator:opendc-simulator-core")) - testRuntimeOnly("org.slf4j:slf4j-simple:${Versions.SLF4J}") + testRuntimeOnly("org.slf4j:slf4j-simple:${versions.slf4j}") } -- cgit v1.2.3 From 2119427fe6f7874867c6985cacda28befc53436b Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Tue, 23 Feb 2021 12:37:31 +0100 Subject: Utilize version constraints for shared versions This change updates the Gradle configuration to utilize version constraints to force the same dependency version across modules. --- simulator/opendc-compute/opendc-compute-core/build.gradle.kts | 3 ++- simulator/opendc-compute/opendc-compute-simulator/build.gradle.kts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'simulator/opendc-compute') diff --git a/simulator/opendc-compute/opendc-compute-core/build.gradle.kts b/simulator/opendc-compute/opendc-compute-core/build.gradle.kts index c6d254d1..f3548b04 100644 --- a/simulator/opendc-compute/opendc-compute-core/build.gradle.kts +++ b/simulator/opendc-compute/opendc-compute-core/build.gradle.kts @@ -31,5 +31,6 @@ dependencies { api(project(":opendc-core")) api(project(":opendc-trace:opendc-trace-core")) implementation(project(":opendc-utils")) - implementation("io.github.microutils:kotlin-logging:${versions.kotlinLogging}") + + implementation("io.github.microutils:kotlin-logging") } diff --git a/simulator/opendc-compute/opendc-compute-simulator/build.gradle.kts b/simulator/opendc-compute/opendc-compute-simulator/build.gradle.kts index 00fdd780..148578cb 100644 --- a/simulator/opendc-compute/opendc-compute-simulator/build.gradle.kts +++ b/simulator/opendc-compute/opendc-compute-simulator/build.gradle.kts @@ -33,7 +33,7 @@ dependencies { api(project(":opendc-simulator:opendc-simulator-compute")) api(project(":opendc-simulator:opendc-simulator-failures")) implementation(project(":opendc-utils")) - implementation("io.github.microutils:kotlin-logging:${versions.kotlinLogging}") + implementation("io.github.microutils:kotlin-logging") testImplementation(project(":opendc-simulator:opendc-simulator-core")) testRuntimeOnly("org.slf4j:slf4j-simple:${versions.slf4j}") -- cgit v1.2.3 From 15fcd1a10018605f59ca7a644b8f3b3960e7b6b0 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Tue, 23 Feb 2021 21:40:53 +0100 Subject: Use Java Platform for shared dependency constraints This change uses the Java Platform functionality from Gradle to enable shared dependency constraints across modules. --- simulator/opendc-compute/opendc-compute-core/build.gradle.kts | 1 + simulator/opendc-compute/opendc-compute-simulator/build.gradle.kts | 1 + 2 files changed, 2 insertions(+) (limited to 'simulator/opendc-compute') diff --git a/simulator/opendc-compute/opendc-compute-core/build.gradle.kts b/simulator/opendc-compute/opendc-compute-core/build.gradle.kts index f3548b04..a1b6ec0f 100644 --- a/simulator/opendc-compute/opendc-compute-core/build.gradle.kts +++ b/simulator/opendc-compute/opendc-compute-core/build.gradle.kts @@ -28,6 +28,7 @@ plugins { } dependencies { + api(platform(project(":opendc-platform"))) api(project(":opendc-core")) api(project(":opendc-trace:opendc-trace-core")) implementation(project(":opendc-utils")) diff --git a/simulator/opendc-compute/opendc-compute-simulator/build.gradle.kts b/simulator/opendc-compute/opendc-compute-simulator/build.gradle.kts index 148578cb..f52d0f97 100644 --- a/simulator/opendc-compute/opendc-compute-simulator/build.gradle.kts +++ b/simulator/opendc-compute/opendc-compute-simulator/build.gradle.kts @@ -29,6 +29,7 @@ plugins { } dependencies { + api(platform(project(":opendc-platform"))) api(project(":opendc-compute:opendc-compute-core")) api(project(":opendc-simulator:opendc-simulator-compute")) api(project(":opendc-simulator:opendc-simulator-failures")) -- cgit v1.2.3