From 903969bc2f4a48e23231fd90ee9fe255156304dd Mon Sep 17 00:00:00 2001 From: Anastasia Chrysanthemum Date: Thu, 28 May 2026 13:35:13 +1000 Subject: [PATCH] fix(build): Fix runtime not being able to be obtained with no attributes. --- .../lgbt/greenhouse/gradle/base/merge.gradle.kts | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/build_logic/src/main/kotlin/lgbt/greenhouse/gradle/base/merge.gradle.kts b/build_logic/src/main/kotlin/lgbt/greenhouse/gradle/base/merge.gradle.kts index 8885295..0d11a3c 100644 --- a/build_logic/src/main/kotlin/lgbt/greenhouse/gradle/base/merge.gradle.kts +++ b/build_logic/src/main/kotlin/lgbt/greenhouse/gradle/base/merge.gradle.kts @@ -56,18 +56,13 @@ configurations { } val jvmEnvironmentElements = setOf( - "apiElements", - "runtimeElements", + "apiElements" ) named { string -> jvmEnvironmentElements.contains(string) }.configureEach { - attributes { - attribute(TargetJvmEnvironment.TARGET_JVM_ENVIRONMENT_ATTRIBUTE, objects.named(TargetJvmEnvironment::class, TargetJvmEnvironment.STANDARD_JVM)) - } } val xplatElements = setOf( "apiElements", - "runtimeElements", "javadocElements", "sourcesElements", "accessTransformersElements", @@ -76,7 +71,6 @@ configurations { named { string -> xplatElements.contains(string) }.configureEach { attributes { attribute(platformAttribute, "xplat") - attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, java.toolchain.languageVersion.get().asInt()) } outgoing { capability("${group}:${props.archivesBaseName}-xplat:${version}") @@ -272,8 +266,7 @@ fun ConfigurationContainer.createPlatformElements(modPlatform: ModPlatform) { attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named(Bundling::class, Bundling.EXTERNAL)) attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, java.toolchain.languageVersion.get().asInt()) attribute(platformAttribute, modPlatform.platformName) - attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, java.toolchain.languageVersion.get().asInt()) - } + } outgoing { capabilities.clear() capability("${group}:${props.archivesBaseName}-${modPlatform.platformName}:${version}") @@ -292,7 +285,6 @@ fun ConfigurationContainer.createPlatformElements(modPlatform: ModPlatform) { attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named(Bundling::class, Bundling.EXTERNAL)) attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, java.toolchain.languageVersion.get().asInt()) attribute(platformAttribute, modPlatform.platformName) - attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, java.toolchain.languageVersion.get().asInt()) } outgoing { capabilities.clear() @@ -311,8 +303,8 @@ fun ConfigurationContainer.createPlatformElements(modPlatform: ModPlatform) { attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named(Bundling::class, Bundling.EXTERNAL)) attribute(DocsType.DOCS_TYPE_ATTRIBUTE, objects.named(DocsType::class, DocsType.JAVADOC)) attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage::class, Usage.JAVA_RUNTIME)) - attribute(platformAttribute, modPlatform.platformName) attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, java.toolchain.languageVersion.get().asInt()) + attribute(platformAttribute, modPlatform.platformName) } outgoing { capabilities.clear() @@ -331,8 +323,8 @@ fun ConfigurationContainer.createPlatformElements(modPlatform: ModPlatform) { attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named(Bundling::class, Bundling.EXTERNAL)) attribute(DocsType.DOCS_TYPE_ATTRIBUTE, objects.named(DocsType::class, DocsType.SOURCES)) attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage::class, Usage.JAVA_RUNTIME)) - attribute(platformAttribute, modPlatform.platformName) attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, java.toolchain.languageVersion.get().asInt()) + attribute(platformAttribute, modPlatform.platformName) } outgoing { capabilities.clear() -- 2.51.2