File tree Expand file tree Collapse file tree 2 files changed +32
-1
lines changed Expand file tree Collapse file tree 2 files changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ subprojects {
104104 }
105105 }
106106
107- if (! this .name.contains(" sample" ) && ! this .name.contains(" integration-tests" ) && this .name != " sentry-test-support" ) {
107+ if (! this .name.contains(" sample" ) && ! this .name.contains(" integration-tests" ) && this .name != " sentry-test-support" && this .name != " sentry-compose-helper " ) {
108108 apply<DistributionPlugin >()
109109
110110 val sep = File .separator
Original file line number Diff line number Diff line change 11import com.android.build.gradle.internal.tasks.LibraryAarJarsTask
2+ import groovy.util.Node
3+ import groovy.util.NodeList
24import io.gitlab.arturbosch.detekt.Detekt
35import org.jetbrains.dokka.gradle.DokkaTask
46
@@ -159,3 +161,32 @@ dependencies {
159161tasks.withType<LibraryAarJarsTask > {
160162 mainScopeClassFiles.setFrom(embedComposeHelperConfig)
161163}
164+
165+ // we embed the sentry-compose-helper classes to the same .jar above
166+ // so we need to exclude the dependency from the .pom publication and .module metadata
167+ configure<PublishingExtension > {
168+ publications.withType(MavenPublication ::class .java).all {
169+ this .pom {
170+ this .withXml {
171+ (asNode().get(" dependencies" ) as NodeList )
172+ .flatMap {
173+ if (it is Node ) it.children() else NodeList ()
174+ }
175+ .filterIsInstance<Node >()
176+ .filter { dependency ->
177+ val artifactIdNodes = dependency.get(" artifactId" ) as NodeList
178+ artifactIdNodes.any {
179+ (it is Node && it.value().toString().contains(" sentry-compose-helper" ))
180+ }
181+ }
182+ .forEach { dependency ->
183+ dependency.parent().remove(dependency)
184+ }
185+ }
186+ }
187+ }
188+ }
189+
190+ tasks.withType<GenerateModuleMetadata > {
191+ enabled = false
192+ }
You can’t perform that action at this time.
0 commit comments