PublishingOptions

interface PublishingOptions

Known direct subclasses
MultipleVariants

Multi variant publishing options.

SingleVariant

Single variant publishing options.

Known indirect subclasses
ApplicationSingleVariant

Single variant publishing options for application projects.

LibrarySingleVariant

Single variant publishing options for library projects.


Maven publishing options shared by SingleVariant and MultipleVariants.

To publish sources & javadoc jar apart from AAR, use withSourcesJar and withJavadocJar. The following sets up publishing of sources & javadoc jar in two different publishing mechanisms.

android {
publishing {
singleVariant("release") {
withSourcesJar()
withJavadocJar()
}

multipleVariants {
withSourcesJar()
withJavadocJar()
allVariants()
}
}
}

Summary

Public functions

Unit

Publish javadoc jar generated from java & kotlin source as a secondary artifact to a Maven repository.

Unit

Publish java & kotlin sources jar as a secondary artifact to a Maven repository.

Public functions

withJavadocJar

fun withJavadocJar(): Unit

Publish javadoc jar generated from java & kotlin source as a secondary artifact to a Maven repository.

withSourcesJar

fun withSourcesJar(): Unit

Publish java & kotlin sources jar as a secondary artifact to a Maven repository.