Commit 47349b8c by ibaker Committed by christosts

Publish gradle attributes for AndroidX compatibility

These attributes are required when importing our artifacts into
androidx-main in order to generate reference documentation (JavaDoc and
KDoc).

#minor-release

PiperOrigin-RevId: 504502555
parent b359502a
Showing with 17 additions and 1 deletions
...@@ -26,10 +26,26 @@ afterEvaluate { ...@@ -26,10 +26,26 @@ afterEvaluate {
publications { publications {
release(MavenPublication) { release(MavenPublication) {
from components.release from components.release
artifact androidSourcesJar
groupId = 'androidx.media3' groupId = 'androidx.media3'
artifactId = findProperty('releaseArtifactId') ?: '' artifactId = findProperty('releaseArtifactId') ?: ''
version = findProperty('releaseVersion') ?: '' 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))
variant.outgoing.artifact(androidSourcesJar)
components.release.addVariantsFromConfiguration(variant) {}
pom { pom {
name = name =
findProperty('releaseName') findProperty('releaseName')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment