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
This commit is contained in:
parent
c91dd02905
commit
d5f0bb23ae
|
@ -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…
Reference in New Issue