Polish test fixture publication skipping config

Thanks to @jjohannes for the tip.

See gh-23550
This commit is contained in:
Sam Brannen 2020-01-03 14:56:13 +01:00
parent 081b3d304d
commit 22a888b53d
1 changed files with 8 additions and 8 deletions

View File

@ -55,6 +55,13 @@ task javadocJar(type: Jar) {
publishing { publishing {
publications { publications {
mavenJava(MavenPublication) { mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
}
}
}
// Disable publication of test fixture artifacts. // Disable publication of test fixture artifacts.
// //
// Once we upgrade to Gradle 6.x, we will need to delete the following line ... // Once we upgrade to Gradle 6.x, we will need to delete the following line ...
@ -62,10 +69,3 @@ publishing {
// ... and uncomment the following two lines. // ... and uncomment the following two lines.
// components.java.withVariantsFromConfiguration(configurations.testFixturesApiElements) { skip() } // components.java.withVariantsFromConfiguration(configurations.testFixturesApiElements) { skip() }
// components.java.withVariantsFromConfiguration(configurations.testFixturesRuntimeElements) { skip() } // components.java.withVariantsFromConfiguration(configurations.testFixturesRuntimeElements) { skip() }
from components.java
artifact sourcesJar
artifact javadocJar
}
}
}