From 770440b9d7613efd40612a5c7f50aa9ed6f302a5 Mon Sep 17 00:00:00 2001 From: Colin Alworth Date: Thu, 30 May 2024 16:07:01 -0500 Subject: [PATCH] Fix publication details for shadowed jars (#5548) Fixes #5547 --- authentication/example-providers/build.gradle | 4 ---- authentication/example-providers/mtls/gradle.properties | 1 + authentication/example-providers/oidc/gradle.properties | 1 + authentication/example-providers/psk/gradle.properties | 1 + .../sql-username-password/gradle.properties | 1 + .../io.deephaven.java-shadow-publishing-conventions.gradle | 5 +++-- 6 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 authentication/example-providers/mtls/gradle.properties create mode 100644 authentication/example-providers/oidc/gradle.properties create mode 100644 authentication/example-providers/psk/gradle.properties create mode 100644 authentication/example-providers/sql-username-password/gradle.properties diff --git a/authentication/example-providers/build.gradle b/authentication/example-providers/build.gradle index 4d1761cd04e..658e25f7980 100644 --- a/authentication/example-providers/build.gradle +++ b/authentication/example-providers/build.gradle @@ -4,10 +4,6 @@ plugins { project.subprojects { Project p -> p.plugins.apply('java-library') - - // Combined, these next two lines will activate the JAVA_PUBLIC_SHADOW to all - // sub-projects, and in turn, apply the shadow plugin - p.setProperty('io.deephaven.project.ProjectType', 'JAVA_PUBLIC_SHADOW') p.plugins.apply('io.deephaven.project.register') p.dependencies { diff --git a/authentication/example-providers/mtls/gradle.properties b/authentication/example-providers/mtls/gradle.properties new file mode 100644 index 00000000000..975fc08cc6e --- /dev/null +++ b/authentication/example-providers/mtls/gradle.properties @@ -0,0 +1 @@ +io.deephaven.project.ProjectType=JAVA_PUBLIC_SHADOW diff --git a/authentication/example-providers/oidc/gradle.properties b/authentication/example-providers/oidc/gradle.properties new file mode 100644 index 00000000000..975fc08cc6e --- /dev/null +++ b/authentication/example-providers/oidc/gradle.properties @@ -0,0 +1 @@ +io.deephaven.project.ProjectType=JAVA_PUBLIC_SHADOW diff --git a/authentication/example-providers/psk/gradle.properties b/authentication/example-providers/psk/gradle.properties new file mode 100644 index 00000000000..975fc08cc6e --- /dev/null +++ b/authentication/example-providers/psk/gradle.properties @@ -0,0 +1 @@ +io.deephaven.project.ProjectType=JAVA_PUBLIC_SHADOW diff --git a/authentication/example-providers/sql-username-password/gradle.properties b/authentication/example-providers/sql-username-password/gradle.properties new file mode 100644 index 00000000000..975fc08cc6e --- /dev/null +++ b/authentication/example-providers/sql-username-password/gradle.properties @@ -0,0 +1 @@ +io.deephaven.project.ProjectType=JAVA_PUBLIC_SHADOW diff --git a/buildSrc/src/main/groovy/io.deephaven.java-shadow-publishing-conventions.gradle b/buildSrc/src/main/groovy/io.deephaven.java-shadow-publishing-conventions.gradle index 5fb2531fc08..ccb61709b22 100644 --- a/buildSrc/src/main/groovy/io.deephaven.java-shadow-publishing-conventions.gradle +++ b/buildSrc/src/main/groovy/io.deephaven.java-shadow-publishing-conventions.gradle @@ -22,9 +22,10 @@ PublishingTools.setupPublications(project) { publication -> // This assumes that the shadow plugin is enabled, rather than using the vanilla java component. // Inlines the shadow.component call, which doesn't actually use components, and doesn't generate - // the pom late enough to pick up gradle's own artifactId wiring from our archivesBaseName changes + // the pom late enough to pick up gradle's own artifactId wiring from our archivesBaseName changes. + // Also un-sets the classifier for the shadow jar, since we want this to be the default artifact // project.shadow.component(publication) - publication.artifact(project.tasks.named("shadowJar")) + publication.artifact(source: project.tasks.named("shadowJar"), classifier: '') publication.pom { withXml { def root = asNode()