Stay organized with collections
Save and categorize content based on your preferences.
HasUnitTestBuilder
interface HasUnitTestBuilder
Interface that mark the potential existence of unit tests associated with a variant.
Summary
Public properties |
Boolean |
Set to true if the variant's has any unit tests, false otherwise.
|
Public properties
enableUnitTest
var enableUnitTest: Boolean
Set to true
if the variant's has any unit tests, false otherwise. Value is Boolean#True by default.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# HasUnitTestBuilder\n==================\n\n\n```\ninterface HasUnitTestBuilder\n```\n\n\u003cbr /\u003e\n\nKnown direct subclasses \n[ApplicationVariantBuilder](/reference/tools/gradle-api/8.1/com/android/build/api/variant/ApplicationVariantBuilder), [DynamicFeatureVariantBuilder](/reference/tools/gradle-api/8.1/com/android/build/api/variant/DynamicFeatureVariantBuilder), [LibraryVariantBuilder](/reference/tools/gradle-api/8.1/com/android/build/api/variant/LibraryVariantBuilder) \n\n|----------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------|\n| [ApplicationVariantBuilder](/reference/tools/gradle-api/8.1/com/android/build/api/variant/ApplicationVariantBuilder) | Application specific variant object that contains properties that will determine the variant's build flow. |\n| [DynamicFeatureVariantBuilder](/reference/tools/gradle-api/8.1/com/android/build/api/variant/DynamicFeatureVariantBuilder) | |\n| [LibraryVariantBuilder](/reference/tools/gradle-api/8.1/com/android/build/api/variant/LibraryVariantBuilder) | [VariantBuilder](/reference/tools/gradle-api/8.1/com/android/build/api/variant/VariantBuilder) type for library projects |\n\n*** ** * ** ***\n\nInterface that mark the potential existence of unit tests associated with a variant.\n\nSummary\n-------\n\n| ### Public properties ||\n|------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [enableUnitTest](/reference/tools/gradle-api/8.1/com/android/build/api/variant/HasUnitTestBuilder#enableUnitTest()) Set to `true` if the variant's has any unit tests, false otherwise. |\n\nPublic properties\n-----------------\n\n### enableUnitTest\n\n```\nvar enableUnitTest: Boolean\n```\n\nSet to `true` if the variant's has any unit tests, false otherwise. Value is Boolean#True by default."]]