summaryrefslogtreecommitdiff
path: root/buildSrc/src/main/kotlin/distribution-conventions.gradle.kts
diff options
context:
space:
mode:
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)
+ }
+ }
+ }
}
}
}