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
This commit is contained in:
parent
b359502a13
commit
47349b8c4b
@ -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')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user