Skip to content

Commit

Permalink
Merged experiment-scenario and experiment-base by moving ScenarioCli.…
Browse files Browse the repository at this point in the history
…kt to experiment-base. Renamed the distribution of experiment-base to OpenDCScenarioRunner (#236)
  • Loading branch information
DanteNiewenhuis authored Jul 12, 2024
1 parent b6153bb commit a17e7ed
Show file tree
Hide file tree
Showing 23 changed files with 37 additions and 3,382 deletions.
36 changes: 36 additions & 0 deletions opendc-experiments/opendc-experiments-base/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ plugins {
`kotlin-library-conventions`
`testing-conventions`
`jacoco-conventions`
distribution
kotlin("plugin.serialization") version "1.9.22"
}

Expand All @@ -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")))
Expand All @@ -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"])
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,14 @@

@file:JvmName("ScenarioCli")

package org.opendc.experiments.scenario
package org.opendc.experiments.base.runner

import com.github.ajalt.clikt.core.CliktCommand
import com.github.ajalt.clikt.parameters.options.default
import com.github.ajalt.clikt.parameters.options.defaultLazy
import com.github.ajalt.clikt.parameters.options.option
import com.github.ajalt.clikt.parameters.types.file
import com.github.ajalt.clikt.parameters.types.int
import org.opendc.experiments.base.runner.runScenarios
import org.opendc.experiments.base.scenario.getScenarios
import java.io.File

Expand Down
96 changes: 0 additions & 96 deletions opendc-experiments/opendc-experiments-scenario/build.gradle.kts

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit a17e7ed

Please sign in to comment.