# ApplicationSingleVariant

# ApplicationSingleVariant

<br />

```
interface ApplicationSingleVariant : SingleVariant
```

<br />

*** ** * ** ***

Single variant publishing options for application projects.

## Summary

|                                                                                                                              ### Public functions                                                                                                                               ||
|------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [publishApk](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/dsl/ApplicationSingleVariant#publishApk())`()` Configure to publish this variant as APK artifact. |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ### Inherited functions                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ||
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| From class[com.android.build.api.dsl.PublishingOptions](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/dsl/PublishingOptions) |------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [withJavadocJar](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/dsl/PublishingOptions#withJavadocJar())`()` Publish javadoc jar generated from java \& kotlin source as a secondary artifact to a Maven repository. | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [withSourcesJar](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/dsl/PublishingOptions#withSourcesJar())`()` Publish java \& kotlin sources jar as a secondary artifact to a Maven repository.                       | |

|                                                                                                                                                                                                                                                                                            ### Inherited properties                                                                                                                                                                                                                                                                                            ||
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| From class[com.android.build.api.dsl.SingleVariant](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/dsl/SingleVariant) |----------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------| | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [variantName](https://developer.android.com/reference/tools/gradle-api/8.1/com/android/build/api/dsl/SingleVariant#variantName()) | |

## Public functions

### publishApk

```
fun publishApk(): Unit
```

Configure to publish this variant as APK artifact. Android Gradle Plugin would publish this variant as AAB artifact if this function is not invoked.