From bc78f8f6c0a6d4067c9ab39e360828be31838c71 Mon Sep 17 00:00:00 2001 From: Andre Kurait Date: Mon, 17 Jun 2024 15:57:09 -0500 Subject: [PATCH] Add gradle task listPublishedArtifacts Signed-off-by: Andre Kurait --- README.md | 24 ++++-------------------- build.gradle | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 71c54bdde..20167799e 100644 --- a/README.md +++ b/README.md @@ -104,28 +104,12 @@ dependencies { } ``` -The entire list of published subprojects is -```text -captureKafkaOffloader -captureOffloader -captureProtobufs -commonDependencyVersionConstraints -coreUtilities -jsonJMESPathMessageTransformer -jsonJMESPathMessageTransformerProvider -jsonJoltMessageTransformer -jsonJoltMessageTransformerProvider -jsonMessageTransformerInterface -jsonMessageTransformers -nettyWireLogging -openSearch23PlusTargetTransformerProvider -testHelperFixtures -trafficCaptureProxyServer -trafficCaptureProxyServerTest -trafficReplayer -transformationPlugins +The entire list of published subprojects can be viewed with +```sh +./gradlew listPublishedArtifacts ``` + To include a testFixture dependency, define the import like ```groovy diff --git a/build.gradle b/build.gradle index 4e0a7dec4..22a461f09 100644 --- a/build.gradle +++ b/build.gradle @@ -87,4 +87,19 @@ subprojects { } } } +} + +task listPublishedArtifacts { + doLast { + subprojects.each { proj -> + def publishingExtension = proj.extensions.findByType(PublishingExtension) + if (publishingExtension) { + publishingExtension.publications.each { publication -> + if (publication instanceof MavenPublication) { + println "${publication.groupId}.${publication.artifactId}" + } + } + } + } + } } \ No newline at end of file