Stop explicitly creating a `sourcesElement` Gradle variant

This variant has been superceded by an equivalent
`releaseVariantReleaseRuntimePublication` variant which (I think) has
been created since d5f9cf4f19.

Before this change the `sourcesElement` variant was being created with
no `files` config, which resulted in build failures when generating
javadoc in AndroidX:

```
However we cannot choose between the following variants of androidx.media3:media3-cast:1.2.0-alpha01:
  - releaseVariantReleaseSourcePublication
  - sourcesElement
```

We can resolve this confusion by deleting the empty & unneeded
`sourcesElement` variant.

#minor-release

PiperOrigin-RevId: 558783471
This commit is contained in:
ibaker 2023-08-21 15:33:44 +01:00 committed by Julia Bibik
parent 91764baa90
commit 849238a52f
1 changed files with 0 additions and 17 deletions

View File

@ -29,23 +29,6 @@ afterEvaluate {
groupId = 'androidx.media3'
artifactId = findProperty('releaseArtifactId') ?: ''
version = findProperty('releaseVersion') ?: ''
configurations.create("sourcesElement") { variant ->
variant.visible = false
variant.canBeResolved = false
variant.attributes.attribute(
Usage.USAGE_ATTRIBUTE,
project.objects.named(Usage, Usage.JAVA_RUNTIME))
variant.attributes.attribute(
Category.CATEGORY_ATTRIBUTE,
project.objects.named(Category, Category.DOCUMENTATION))
variant.attributes.attribute(
Bundling.BUNDLING_ATTRIBUTE,
project.objects.named(Bundling, Bundling.EXTERNAL))
variant.attributes.attribute(
DocsType.DOCS_TYPE_ATTRIBUTE,
project.objects.named(DocsType, DocsType.SOURCES))
components.release.addVariantsFromConfiguration(variant) {}
}
pom {
name =
findProperty('releaseName')