From 22a888b53df620b0905ce8beb6b0cf71981086d8 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Fri, 3 Jan 2020 14:56:13 +0100 Subject: [PATCH] Polish test fixture publication skipping config Thanks to @jjohannes for the tip. See gh-23550 --- gradle/spring-module.gradle | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/gradle/spring-module.gradle b/gradle/spring-module.gradle index 5c513b976e3..048735af1cb 100644 --- a/gradle/spring-module.gradle +++ b/gradle/spring-module.gradle @@ -55,17 +55,17 @@ task javadocJar(type: Jar) { publishing { publications { mavenJava(MavenPublication) { - // Disable publication of test fixture artifacts. - // - // Once we upgrade to Gradle 6.x, we will need to delete the following line ... - components.java.variants.removeAll { it.outgoingConfiguration.name.startsWith("testFixtures") } - // ... and uncomment the following two lines. - // components.java.withVariantsFromConfiguration(configurations.testFixturesApiElements) { skip() } - // components.java.withVariantsFromConfiguration(configurations.testFixturesRuntimeElements) { skip() } - from components.java artifact sourcesJar artifact javadocJar } } } + +// Disable publication of test fixture artifacts. +// +// Once we upgrade to Gradle 6.x, we will need to delete the following line ... +components.java.variants.removeAll { it.outgoingConfiguration.name.startsWith("testFixtures") } +// ... and uncomment the following two lines. +// components.java.withVariantsFromConfiguration(configurations.testFixturesApiElements) { skip() } +// components.java.withVariantsFromConfiguration(configurations.testFixturesRuntimeElements) { skip() }