Polish test fixture publication skipping config
Thanks to @jjohannes for the tip. See gh-23550
This commit is contained in:
parent
081b3d304d
commit
22a888b53d
|
@ -55,17 +55,17 @@ task javadocJar(type: Jar) {
|
||||||
publishing {
|
publishing {
|
||||||
publications {
|
publications {
|
||||||
mavenJava(MavenPublication) {
|
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
|
from components.java
|
||||||
artifact sourcesJar
|
artifact sourcesJar
|
||||||
artifact javadocJar
|
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() }
|
||||||
|
|
Loading…
Reference in New Issue