From c1399c15f62734a7e49c6040deb6bf7c9e7c9dc0 Mon Sep 17 00:00:00 2001 From: Roman Zavarnitsyn Date: Tue, 31 Jan 2023 09:07:09 +0100 Subject: [PATCH] Fix Sentry BOM containing wrong artifacts (#2504) --- CHANGELOG.md | 1 + sentry-bom/build.gradle.kts | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7c0c07475..18d48c036c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Fixes - Remove authority from URLs sent to Sentry ([#2366](https://github.com/getsentry/sentry-java/pull/2366)) +- Fix `sentry-bom` containing incorrect artifacts ([#2504](https://github.com/getsentry/sentry-java/pull/2504)) ### Dependencies diff --git a/sentry-bom/build.gradle.kts b/sentry-bom/build.gradle.kts index 5be72d9abb..9f0a0ff117 100644 --- a/sentry-bom/build.gradle.kts +++ b/sentry-bom/build.gradle.kts @@ -9,10 +9,21 @@ dependencies { .filter { !it.name.startsWith("sentry-samples") && it.name != project.name && - it.name != "sentry-test-support" + !it.name.contains("test", ignoreCase = true) && + it.name != "sentry-compose-helper" } - .forEach { - api(it) + .forEach { project -> + evaluationDependsOn(project.path) + project.publishing.publications + .mapNotNull { it as? MavenPublication } + .filter { + !it.artifactId.endsWith("-kotlinMultiplatform") && + !it.artifactId.endsWith("-metadata") + } + .forEach { + val dependency = "${it.groupId}:${it.artifactId}:${it.version}" + api(dependency) + } } } }