From 7422935a102e887641b235adbd0b73a80faf9dcb Mon Sep 17 00:00:00 2001 From: Giuseppe Barbieri Date: Mon, 24 Jun 2024 18:33:17 +0200 Subject: [PATCH] resolve missing versionCatalogElements variant in Gradle metadata files --- gradle-scijava/build.gradle.kts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gradle-scijava/build.gradle.kts b/gradle-scijava/build.gradle.kts index 2023f90..d372dde 100644 --- a/gradle-scijava/build.gradle.kts +++ b/gradle-scijava/build.gradle.kts @@ -11,7 +11,7 @@ plugins { // id("org.gradlex.logging-capabilities") // logging extension } -layout.buildDirectory.set(layout.projectDirectory.asFile.parentFile.resolve("target/gradle")) +layout.buildDirectory = layout.projectDirectory.asFile.parentFile.resolve("target/gradle") group = "org.scijava" version = "0.13" //(effXml / "version").toString() @@ -100,10 +100,17 @@ publishing { } create("pomScijava") { from(components["javaPlatform"]) + // from(components["versionCatalog"]) } } } +val versionCatalogElements by configurations +val javaPlatform by components.existing { + this as AdhocComponentWithVariants + addVariantsFromConfiguration(versionCatalogElements) {} +} + tasks { // dependsOn runs only if the src is successful, finalizedBy not generateCatalogAsToml { dependsOn(computeCatalogAndPlatform) }