# GeneratesApk

# GeneratesApk

[View Source](https://cs.android.com/search?q=file:com/android/build/api/variant/GeneratesApk.kt+class:com.android.build.api.variant.GeneratesApk)  
Added in 7.0.0  

<br />

```
interface GeneratesApk
```

<br />

Known direct subclasses  
[ApplicationVariant](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/variant/ApplicationVariant),[DynamicFeatureVariant](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/variant/DynamicFeatureVariant),[GeneratesTestApk](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/variant/GeneratesTestApk)  

|--------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [ApplicationVariant](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/variant/ApplicationVariant)       | Model for application components that only contains build-time properties.                                                                                         |
| [DynamicFeatureVariant](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/variant/DynamicFeatureVariant) | Model for dynamic feature components that only contains build-time properties.                                                                                     |
| [GeneratesTestApk](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/variant/GeneratesTestApk)           | Build-time properties for[Component](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/variant/Component)that produce test APKs. |

Known indirect subclasses  
[AndroidTest](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/variant/AndroidTest),[DeviceTest](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/variant/DeviceTest),[TestVariant](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/variant/TestVariant)  

|------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------|
| [AndroidTest](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/variant/AndroidTest) | Model for Android Test components that contains build-time properties |
| [DeviceTest](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/variant/DeviceTest)   | Model for Device Test components that contains build-time properties  |
| [TestVariant](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/variant/TestVariant) | Model for test components that only contains build-time properties.   |

*** ** * ** ***

Build-time properties for[Component](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/variant/Component)that produce APKs.

## Summary

|                                                                              ### Public properties                                                                              |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [AndroidResources](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/variant/AndroidResources)                                                | [androidResources](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/variant/GeneratesApk#androidResources()) Variant's android resources processing configuration, initialized by the corresponding global DSL element. |
| [Provider](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Provider.html)`<`[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`>` | [applicationId](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/variant/GeneratesApk#applicationId()) Variant's application ID as present in the final manifest file of the APK.                                       |
| [Dexing](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/variant/Dexing)                                                                    | [dexing](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/variant/GeneratesApk#dexing()) Variant's specific dexing options                                                                                              |
| [AndroidVersion](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/variant/AndroidVersion)                                                    | [minSdk](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/variant/GeneratesApk#minSdk()) Min SDK version for this variant                                                                                               |
| [ApkOutputProviders](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/variant/ApkOutputProviders)                                            | [outputProviders](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/variant/GeneratesApk#outputProviders()) Provides access to built artifacts output(e.g. APK) produced by this Variant.                                |
| [ApkPackaging](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/variant/ApkPackaging)                                                        | [packaging](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/variant/GeneratesApk#packaging()) Variant's packagingOptions, initialized by the corresponding global DSL element.                                         |
| [Renderscript](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/variant/Renderscript)`?`                                                     | [renderscript](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/variant/GeneratesApk#renderscript()) Variant specific settings for the renderscript compiler.                                                           |
| [AndroidVersion](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/variant/AndroidVersion)                                                    | [targetSdk](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/variant/GeneratesApk#targetSdk()) Target SDK version for this variant.                                                                                     |
| [AndroidVersion](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/variant/AndroidVersion)                                                    | [targetSdkVersion](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/variant/GeneratesApk#targetSdkVersion()) **This property is deprecated.**Replaced with targetSdk, will be removed in 9.0                            |

## Public properties

### androidResources

Added in 7.0.0  

```
val androidResources: AndroidResources
```

Variant's android resources processing configuration, initialized by the corresponding global DSL element.  

### applicationId

Added in 7.0.0  

```
val applicationId: Provider<String>
```

Variant's application ID as present in the final manifest file of the APK.  

### dexing

Added in 8.3.1  

```
val dexing: Dexing
```

Variant's specific dexing options  

### minSdk

Added in 8.8.0  

```
val minSdk: AndroidVersion
```

Min SDK version for this variant  

### outputProviders

Added in 8.13.1  

```
val outputProviders: ApkOutputProviders
```

Provides access to built artifacts output(e.g. APK) produced by this Variant.  

### packaging

Added in 7.0.0  

```
val packaging: ApkPackaging
```

Variant's packagingOptions, initialized by the corresponding global DSL element.  

### renderscript

Added in 7.0.0  

```
val renderscript: Renderscript?
```

Variant specific settings for the renderscript compiler. This will return null when[com.android.build.api.dsl.BuildFeatures.renderScript](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/dsl/BuildFeatures#renderScript())is false.  

### targetSdk

Added in 8.1.0  

```
val targetSdk: AndroidVersion
```

Target SDK version for this variant.  

### targetSdkVersion

Added in 7.4.0  
Deprecated in 8.1.0  

```
val targetSdkVersion: AndroidVersion
```
| **This property is deprecated.**   
| Replaced with targetSdk, will be removed in 9.0