From 943d7d5130f004a24cb84785903f45538bfb6881 Mon Sep 17 00:00:00 2001 From: Scott Mitchell Date: Thu, 4 Aug 2022 14:16:48 -0700 Subject: [PATCH] Revert dependencies bom manually including modules (#2308) Motivation: [MNG-6772](https://issues.apache.org/jira/browse/MNG-6772) may impact maven users but as a work around maven users can include internal boms directly in their projects. --- gradle/bomUtils.gradle | 18 ------------------ servicetalk-bom/build.gradle | 5 +++-- servicetalk-dependencies/build.gradle | 8 +------- 3 files changed, 4 insertions(+), 27 deletions(-) delete mode 100644 gradle/bomUtils.gradle diff --git a/gradle/bomUtils.gradle b/gradle/bomUtils.gradle deleted file mode 100644 index 5f77f74dc8..0000000000 --- a/gradle/bomUtils.gradle +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright © 2022 Apple Inc. and the ServiceTalk project authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -ext.bomInclusionClosure = {it -> !it.name.endsWith("-bom") && !it.name.endsWith("-dependencies") && - !it.name.contains("examples") && !it.name.equals("grpc") && !it.name.equals("http")} diff --git a/servicetalk-bom/build.gradle b/servicetalk-bom/build.gradle index 1a050bbe33..5c2f3643c2 100644 --- a/servicetalk-bom/build.gradle +++ b/servicetalk-bom/build.gradle @@ -16,11 +16,12 @@ apply plugin: "io.servicetalk.servicetalk-gradle-plugin-internal-core" apply plugin: "java-platform" -apply from: "../gradle/bomUtils.gradle" description="ServiceTalk BOM that includes all modules" -rootProject.subprojects.findAll { it -> bomInclusionClosure(it) }.each { +rootProject.subprojects.findAll { !it.name.endsWith("-bom") && !it.name.endsWith("-dependencies") && + !it.name.contains("examples") && !it.name.equals("grpc") && + !it.name.equals("http")}.each { dependencies.constraints.add("api", it) } diff --git a/servicetalk-dependencies/build.gradle b/servicetalk-dependencies/build.gradle index da919b06e3..7b84eb8081 100644 --- a/servicetalk-dependencies/build.gradle +++ b/servicetalk-dependencies/build.gradle @@ -16,7 +16,6 @@ apply plugin: "io.servicetalk.servicetalk-gradle-plugin-internal-core" apply plugin: "java-platform" -apply from: "../gradle/bomUtils.gradle" description = "ServiceTalk BOM that includes all modules and direct dependencies" @@ -24,13 +23,8 @@ javaPlatform { allowDependencies() } -// Include modules directly rather than by defining servicetalk bom as -// a platform to work around [MNG-6772](https://issues.apache.org/jira/browse/MNG-6772). -rootProject.subprojects.findAll { it -> bomInclusionClosure(it) }.each { - dependencies.constraints.add("api", it) -} - dependencies { + api platform(project(":servicetalk-bom")) api platform("io.netty:netty-bom:${nettyVersion}") api platform("com.google.protobuf:protobuf-bom:${protobufVersion}") api platform("org.apache.logging.log4j:log4j-bom:${log4jVersion}")