Skip to content

Commit

Permalink
Polish test fixture publication skipping config
Browse files Browse the repository at this point in the history
Thanks to @jjohannes for the tip.

See gh-23550
  • Loading branch information
sbrannen committed Jan 3, 2020
1 parent 081b3d3 commit 22a888b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions gradle/spring-module.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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() }

0 comments on commit 22a888b

Please sign in to comment.