PublishingOptions

interface PublishingOptions
MultipleVariants

Multi variant publishing options.

SingleVariant

Single variant publishing options.

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 Unit

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

abstract Unit

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

Public methods

withJavadocJar

abstract fun withJavadocJar(): Unit

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

withSourcesJar

abstract fun withSourcesJar(): Unit

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