Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# VariantInfo\n===========\n\n\n```\ninterface VariantInfo\n```\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\n| **This interface is deprecated.** \n\nInformation about the variant being built.\n\nOnly the Android Gradle Plugin should create instances of this interface.\n\nImmutable, no access to tasks\n\nSummary\n-------\n\n| ### Public functions ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!` | [getBuildTypeName](/reference/tools/gradle-api/7.4/com/android/build/api/variant/VariantInfo#getBuildTypeName())`()` Returns the name of the build type. |\n| [ImmutableList](https://guava.dev/releases/18.0/api/docs/com/google/common/collect/ImmutableList.html)`\u003c`[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!\u003e!` | [getFlavorNames](/reference/tools/gradle-api/7.4/com/android/build/api/variant/VariantInfo#getFlavorNames())`()` Returns a list of flavor names that make up this variant. |\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!` | [getFullVariantName](/reference/tools/gradle-api/7.4/com/android/build/api/variant/VariantInfo#getFullVariantName())`()` Returns the name of the variant. |\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [isDebuggable](/reference/tools/gradle-api/7.4/com/android/build/api/variant/VariantInfo#isDebuggable())`()` Returns true if the variant is debuggable |\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [isTest](/reference/tools/gradle-api/7.4/com/android/build/api/variant/VariantInfo#isTest())`()` Returns true if this is a test variant |\n\nPublic functions\n----------------\n\n### getBuildTypeName\n\n```\nfun getBuildTypeName(): String!\n```\n\nReturns the name of the build type.\n\nBy convention, build-type settings should override flavor settings. \n\n### getFlavorNames\n\n```\nfun getFlavorNames(): ImmutableList\u003cString!\u003e!\n```\n\nReturns a list of flavor names that make up this variant.\n\nBy convention settings from earlier flavors should override settings from later flavors. \n\n| Returns ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------|\n| [ImmutableList](https://guava.dev/releases/18.0/api/docs/com/google/common/collect/ImmutableList.html)`\u003c`[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!\u003e!` | the ordered list of flavor names. May be empty. |\n\n### getFullVariantName\n\n```\nfun getFullVariantName(): String!\n```\n\nReturns the name of the variant. This is composed of the build types and flavors \n\n### isDebuggable\n\n```\nfun isDebuggable(): Boolean\n```\n\nReturns true if the variant is debuggable \n\n### isTest\n\n```\nfun isTest(): Boolean\n```\n\nReturns true if this is a test variant"]]