Browse Source

Disable publication of test fixture artifacts

Thanks to @melix for providing the code snippet necessary to achieve
this with Gradle 5.6.x.

See gh-23550
pull/24287/head
Sam Brannen 5 years ago
parent
commit
d5f0bb23ae
  1. 8
      gradle/spring-module.gradle

8
gradle/spring-module.gradle

@ -55,6 +55,14 @@ task javadocJar(type: Jar) { @@ -55,6 +55,14 @@ 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

Loading…
Cancel
Save