PublishingOptions

public 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 methods

abstract void

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

abstract void

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

Public methods

withJavadocJar

abstract void withJavadocJar()

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

withSourcesJar

abstract void withSourcesJar()

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