From 4a8b32d288ba3ee986ecef7933fa77554d34e762 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Tue, 4 May 2021 19:19:47 +0200 Subject: harness: Split harness into separate modules This change splits the OpenDC Experiment Harness into separate modules. This prevents users from pulling in unnecessary dependencies when depending on the harness API. --- opendc-harness/opendc-harness-cli/build.gradle.kts | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 opendc-harness/opendc-harness-cli/build.gradle.kts (limited to 'opendc-harness/opendc-harness-cli/build.gradle.kts') diff --git a/opendc-harness/opendc-harness-cli/build.gradle.kts b/opendc-harness/opendc-harness-cli/build.gradle.kts new file mode 100644 index 00000000..26f02f55 --- /dev/null +++ b/opendc-harness/opendc-harness-cli/build.gradle.kts @@ -0,0 +1,39 @@ +/* + * 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. + */ + +description = "Command line interface of OpenDC Harness" + +/* Build configuration */ +plugins { + `kotlin-library-conventions` +} + +dependencies { + api(platform(project(":opendc-platform"))) + api(project(":opendc-harness:opendc-harness-engine")) + + implementation("io.github.microutils:kotlin-logging") + implementation("com.github.ajalt.clikt:clikt:${versions["clikt"]}") + implementation("me.tongfei:progressbar:${versions["progressbar"]}") + + runtimeOnly("org.apache.logging.log4j:log4j-slf4j-impl:${versions.log4j}") +} -- cgit v1.2.3 From 6466d5e1b8da4582434f02dff2ab56e8f736ef85 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Tue, 4 May 2021 20:31:48 +0200 Subject: harness: Extend Harness CLI with classpath options This change adds support for appending libraries to the classpath when searching for experiments to run using the OpenDC Harness command line interface. --- opendc-harness/opendc-harness-cli/build.gradle.kts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'opendc-harness/opendc-harness-cli/build.gradle.kts') diff --git a/opendc-harness/opendc-harness-cli/build.gradle.kts b/opendc-harness/opendc-harness-cli/build.gradle.kts index 26f02f55..3e169e2a 100644 --- a/opendc-harness/opendc-harness-cli/build.gradle.kts +++ b/opendc-harness/opendc-harness-cli/build.gradle.kts @@ -25,6 +25,12 @@ description = "Command line interface of OpenDC Harness" /* Build configuration */ plugins { `kotlin-library-conventions` + application +} + +application { + applicationName = "opendc-harness" + mainClass.set("org.opendc.harness.runner.cli.ConsoleRunnerKt") } dependencies { -- cgit v1.2.3