summaryrefslogtreecommitdiff
path: root/buildSrc/src/main/kotlin/distribution-conventions.gradle.kts
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2021-05-05 12:23:25 +0200
committerGitHub <noreply@github.com>2021-05-05 12:23:25 +0200
commite1d892bcbaa7e8361c150f684ca6a0dc5e036a87 (patch)
tree99742afbc3cd762ec527f5a6c7e31ee245ee0385 /buildSrc/src/main/kotlin/distribution-conventions.gradle.kts
parente021d46ab1601d0c3a00724358164483608f6297 (diff)
parent7fdfe48439f33abec8aa63fc4ab36fd687d59a43 (diff)
harness: Improve OpenDC Experiment Harness (v1)
This pull request contains several improvements to the OpenDC Experiment Harness, which aims to improve user-experience of users when re-running experiments in the repository. * Split the harness into separate modules * Add support for adding additional classpath entries when running experiments via the console * Initial support for configuration of experiments using HOCON.
Diffstat (limited to 'buildSrc/src/main/kotlin/distribution-conventions.gradle.kts')
-rw-r--r--buildSrc/src/main/kotlin/distribution-conventions.gradle.kts17
1 files changed, 14 insertions, 3 deletions
diff --git a/buildSrc/src/main/kotlin/distribution-conventions.gradle.kts b/buildSrc/src/main/kotlin/distribution-conventions.gradle.kts
index a0b7593d..57e5b284 100644
--- a/buildSrc/src/main/kotlin/distribution-conventions.gradle.kts
+++ b/buildSrc/src/main/kotlin/distribution-conventions.gradle.kts
@@ -39,12 +39,23 @@ distributions {
from("README.md")
from("LICENSE.txt")
+ from("docs") { into("docs") }
- // Include the distributions of the sub project.
+ // Include distributions of the subprojects
getTasksByName("assembleDist", true)
.filter { it.project != project }
- .map { it.project.the<DistributionContainer>()["main"] }
- .forEach { with(it.contents) }
+ .map { it.project.name to it.project.the<DistributionContainer>() }
+ .forEach { (name, dist) ->
+ dist.findByName("main")?.let { with(it.contents) }
+
+ // Include experiments if they exist
+ val experiment = dist.findByName("experiment")
+ if (experiment != null) {
+ into("experiments/${name.removePrefix("opendc-experiments-")}") {
+ with(experiment.contents)
+ }
+ }
+ }
}
}
}