From 7321a56a0fe92308c5b20c2a789ab77907ca480e Mon Sep 17 00:00:00 2001 From: Ben Manes Date: Sat, 3 Dec 2022 21:17:51 -0800 Subject: [PATCH] remove dependencyConstraints from the published gradle module metadata --- build.gradle | 8 +++++--- gradle/publish.gradle | 4 ---- settings.gradle | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/build.gradle b/build.gradle index 7bdb706118..b1ca21ae86 100644 --- a/build.gradle +++ b/build.gradle @@ -46,10 +46,12 @@ allprojects { } dependencies { - def deprecated = ['apiElements', 'archives', 'compileClasspath', 'default', - 'runtimeClasspath', 'runtimeElements', 'testCompileClasspath', 'testRuntimeClasspath'] + def ignored = [ + 'api', 'apiElements', 'archives', 'compileClasspath', 'compileOnlyApi', 'default', + 'implementation', 'javadocElements', 'runtimeClasspath', 'runtimeElements', 'runtimeOnly', + 'sourcesElements', 'testCompileClasspath', 'testRuntimeClasspath'] configurations.all { configuration -> - if (name !in deprecated) { + if (name !in ignored) { restrictions.each { module, version -> constraints.add(configuration.name, module).version { require version } } diff --git a/gradle/publish.gradle b/gradle/publish.gradle index 8212c171cb..0821904a5c 100644 --- a/gradle/publish.gradle +++ b/gradle/publish.gradle @@ -37,10 +37,6 @@ publishing { url = 'https://github.com/ben-manes/caffeine' inceptionYear = '2014' - withXml { - asNode().remove(asNode().dependencyManagement) - } - scm { url = 'https://github.com/ben-manes/caffeine' connection = 'scm:git:https://github.com/ben-manes/caffeine.git' diff --git a/settings.gradle b/settings.gradle index d4617503a6..b5db0997e5 100644 --- a/settings.gradle +++ b/settings.gradle @@ -10,10 +10,10 @@ gradleEnterprise { } buildScan { capture.taskInputFiles = true - publishAlways() if (System.env.CI) { uploadInBackground = false + publishAlways() } else { obfuscation.ipAddresses { [] } }