summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2022-10-06 11:08:03 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2022-10-06 11:35:58 +0200
commitd447295f535c3587c82d809397cb1a5f23ab1b4b (patch)
tree724ffe1653eab474f1f33c71385d787af348b7fa
parent14c6a67b384ea11fd5b06a0189bac56cfae9f106 (diff)
build: Remove unused distribution conventions
This change removes the distribution conventions used by the root project of OpenDC. Previously, we used this to build a single distribution for OpenDC containing the experiment uberjars and scripts to start OpenDC. However, with the introduction of the Quarkus-based web server, we have decided to split releases into (potentially) multiple distributions (e.g., one for the web server, one for just the web runner, etc.). Furthermore, the implementation of this convention caused issues with several other Gradle plugins.
-rw-r--r--.github/workflows/release.yml2
-rw-r--r--build.gradle.kts1
-rw-r--r--buildSrc/src/main/kotlin/distribution-conventions.gradle.kts51
3 files changed, 1 insertions, 53 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index d0b985c0..2d893edf 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -36,6 +36,6 @@ jobs:
with:
draft: true
prerelease: ${{ contains(github.ref, '-rc') || contains(github.ref, '-m') }}
- files: build/distributions/*
+ files: "**/build/distributions/*"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/build.gradle.kts b/build.gradle.kts
index 87a338b9..bda23ae8 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -23,7 +23,6 @@
plugins {
`dokka-conventions`
`jacoco-aggregation`
- `distribution-conventions`
}
allprojects {
diff --git a/buildSrc/src/main/kotlin/distribution-conventions.gradle.kts b/buildSrc/src/main/kotlin/distribution-conventions.gradle.kts
deleted file mode 100644
index ebbe46ee..00000000
--- a/buildSrc/src/main/kotlin/distribution-conventions.gradle.kts
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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.
- */
-
-import org.gradle.api.distribution.DistributionContainer
-
-
-plugins {
- distribution
-}
-
-tasks.named("assembleDist") {
- val tasks = getTasksByName("assembleDist", true).filter { it.project != project }
- dependsOn(tasks)
-}
-
-distributions {
- main {
- contents {
- duplicatesStrategy = DuplicatesStrategy.EXCLUDE
-
- from("README.md")
- from("LICENSE.txt")
- from("docs") { into("docs") }
-
- // Include distributions of the subprojects
- getTasksByName("assembleDist", true)
- .filter { it.project != project }
- .map { it.project.the<DistributionContainer>() }
- .forEach { dist -> dist.findByName("main")?.let { with(it.contents) } }
- }
- }
-}