# LibraryVariant

# LibraryVariant

<br />

```
interface LibraryVariant : ComponentIdentity, Component, HasAndroidResources, Variant, GeneratesAar, HasAndroidTest, HasTestFixtures
```

<br />

*** ** * ** ***

[Variant](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/variant/Variant)for Library projects

## Summary

|                                                                                                                                                     ### Public properties                                                                                                                                                     ||
|----------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Renderscript](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/variant/Renderscript)`?` | [renderscript](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/variant/LibraryVariant#renderscript()) Variant specific settings for the renderscript compiler. |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ### Inherited functions                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ||
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| From class[Component](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/variant/Component) |------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | ~~[setAsmFramesComputationMode](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/variant/Component#setAsmFramesComputationMode(com.android.build.api.instrumentation.FramesComputationMode))~~`(mode: `[FramesComputationMode](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/instrumentation/FramesComputationMode)`?)` **This function is deprecated.**Use the instrumentation block.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `<ParamT : `[InstrumentationParameters](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/instrumentation/InstrumentationParameters)`?> `~~[transformClassesWith](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/variant/Component#transformClassesWith(java.lang.Class,com.android.build.api.instrumentation.InstrumentationScope,kotlin.Function1))~~`(` ` classVisitorFactoryImplClass: `[Class](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html)`<`[AsmClassVisitorFactory](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/instrumentation/AsmClassVisitorFactory)`<ParamT?>?>?,` ` scope: `[InstrumentationScope](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/instrumentation/InstrumentationScope)`?,` ` instrumentationParamsConfig: ((ParamT) `->` `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`)?` `)` **This function is deprecated.**Use the instrumentation block. | |
| From class[HasAndroidResources](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/variant/HasAndroidResources) |-------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [ResValue.Key](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/variant/ResValue.Key) | [makeResValueKey](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/variant/HasAndroidResources#makeResValueKey(kotlin.String,kotlin.String))`(type: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?, name: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?)` Make a[ResValue.Key](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/variant/ResValue.Key)to interact with[resValues](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/variant/HasAndroidResources#resValues())'s[MapProperty](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/MapProperty.html) |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| From class[Variant](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/variant/Variant) |------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `T?` | `<T : `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`?> `[getExtension](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/variant/Variant#getExtension(java.lang.Class))`(type: `[Class](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html)`<T?>?)` Returns an extension object registered via the[VariantBuilder.registerExtension](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/variant/VariantBuilder#registerExtension(java.lang.Class,kotlin.Any))API or null if none were registered under the passed[type](https://developer.android.com/reference/tools/gradle-api/7.2/com/android/build/api/variant/Variant#getExtension(java.lang.Class)). |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |

## Public properties

### renderscript

```
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/7.2/com/android/build/api/dsl/BuildFeatures#renderScript())is false.