diff --git a/shadowed/antlr/build.gradle.kts b/shadowed/antlr/build.gradle.kts index f62cafbdf..4262fbe41 100644 --- a/shadowed/antlr/build.gradle.kts +++ b/shadowed/antlr/build.gradle.kts @@ -96,8 +96,11 @@ tasks.assemble { val javaComponent = components["java"] as AdhocComponentWithVariants listOf("apiElements", "runtimeElements").forEach { unpublishable -> - // Hide the un-shadowed variants in local consumption - configurations[unpublishable].isCanBeConsumed = false + // Hide the un-shadowed variants in local consumption, by mangling their attributes + configurations[unpublishable].attributes { + attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named("DO_NOT_USE")) + } + // Hide the un-shadowed variants in publishing javaComponent.withVariantsFromConfiguration(configurations[unpublishable]) { skip() } } diff --git a/shadowed/asm-relocated/build.gradle.kts b/shadowed/asm-relocated/build.gradle.kts index 578c9697e..26d710281 100644 --- a/shadowed/asm-relocated/build.gradle.kts +++ b/shadowed/asm-relocated/build.gradle.kts @@ -61,8 +61,11 @@ tasks.assemble { val javaComponent = components["java"] as AdhocComponentWithVariants listOf("apiElements", "runtimeElements").forEach { unpublishable -> - // Hide the un-shadowed variants in local consumption - configurations[unpublishable].isCanBeConsumed = false + // Hide the un-shadowed variants in local consumption, by mangling their attributes + configurations[unpublishable].attributes { + attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named("DO_NOT_USE")) + } + // Hide the un-shadowed variants in publishing javaComponent.withVariantsFromConfiguration(configurations[unpublishable]) { skip() } } diff --git a/shadowed/kotlin-editor-relocated/build.gradle.kts b/shadowed/kotlin-editor-relocated/build.gradle.kts index 3fb75443e..6a6516096 100644 --- a/shadowed/kotlin-editor-relocated/build.gradle.kts +++ b/shadowed/kotlin-editor-relocated/build.gradle.kts @@ -63,8 +63,11 @@ tasks.assemble { val javaComponent = components["java"] as AdhocComponentWithVariants listOf("apiElements", "runtimeElements").forEach { unpublishable -> - // Hide the un-shadowed variants in local consumption - configurations[unpublishable].isCanBeConsumed = false + // Hide the un-shadowed variants in local consumption, by mangling their attributes + configurations[unpublishable].attributes { + attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named("DO_NOT_USE")) + } + // Hide the un-shadowed variants in publishing javaComponent.withVariantsFromConfiguration(configurations[unpublishable]) { skip() } }