diff options
| author | Dante Niewenhuis <d.niewenhuis@hotmail.com> | 2024-07-12 14:08:53 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-12 14:08:53 +0200 |
| commit | a17e7eda3cfd70b033e2fb6097880fba7f5af864 (patch) | |
| tree | 7d41d56c06c358247b305246eefcaf9b7d595cda /opendc-experiments/opendc-experiments-base/build.gradle.kts | |
| parent | b6153bbf24970a5b4ba103de00e440911dcc8694 (diff) | |
Merged experiment-scenario and experiment-base by moving ScenarioCli.kt to experiment-base. Renamed the distribution of experiment-base to OpenDCScenarioRunner (#236)
Diffstat (limited to 'opendc-experiments/opendc-experiments-base/build.gradle.kts')
| -rw-r--r-- | opendc-experiments/opendc-experiments-base/build.gradle.kts | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/opendc-experiments/opendc-experiments-base/build.gradle.kts b/opendc-experiments/opendc-experiments-base/build.gradle.kts index 30510785..303517aa 100644 --- a/opendc-experiments/opendc-experiments-base/build.gradle.kts +++ b/opendc-experiments/opendc-experiments-base/build.gradle.kts @@ -27,6 +27,7 @@ plugins { `kotlin-library-conventions` `testing-conventions` `jacoco-conventions` + distribution kotlin("plugin.serialization") version "1.9.22" } @@ -35,6 +36,8 @@ dependencies { api(projects.opendcCompute.opendcComputeService) api(projects.opendcCompute.opendcComputeSimulator) + implementation(libs.clikt) + implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0") implementation(libs.progressbar) implementation(project(mapOf("path" to ":opendc-simulator:opendc-simulator-core"))) @@ -48,3 +51,36 @@ dependencies { runtimeOnly(libs.log4j.core) runtimeOnly(libs.log4j.slf4j) } + +val createScenarioApp by tasks.creating(CreateStartScripts::class) { + dependsOn(tasks.jar) + + applicationName = "OpenDCScenarioRunner" + mainClass.set("org.opendc.experiments.base.ScenarioCLI") + classpath = tasks.jar.get().outputs.files + configurations["runtimeClasspath"] + outputDir = project.buildDir.resolve("scripts") +} + +// Create custom Scenario distribution +distributions { + main { + distributionBaseName.set("OpenDCScenarioRunner") + + contents { + from("README.md") + from("LICENSE.txt") + from("../../LICENSE.txt") { + rename { "LICENSE-OpenDC.txt" } + } + + into("bin") { + from(createScenarioApp) + } + + into("lib") { + from(tasks.jar) + from(configurations["runtimeClasspath"]) + } + } + } +} |
