From d447295f535c3587c82d809397cb1a5f23ab1b4b Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Thu, 6 Oct 2022 11:08:03 +0200 Subject: 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. --- .github/workflows/release.yml | 2 +- build.gradle.kts | 1 - .../kotlin/distribution-conventions.gradle.kts | 51 ---------------------- 3 files changed, 1 insertion(+), 53 deletions(-) delete mode 100644 buildSrc/src/main/kotlin/distribution-conventions.gradle.kts 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() } - .forEach { dist -> dist.findByName("main")?.let { with(it.contents) } } - } - } -} -- cgit v1.2.3