Stay organized with collections
Save and categorize content based on your preferences.
@Incubating interface KotlinMultiplatformAndroidVariant : HasAndroidTest, HasUnitTest
Properties for the main Variant of a kotlin multiplatform android library
Summary
Public properties |
Artifacts |
Access to the variant's buildable artifacts for build customization.
|
FileCollection |
Access to the variant's compile classpath.
|
Instrumentation |
Access to the variant's instrumentation options.
|
String |
The name of the variant
|
Public properties
artifacts
val artifacts: Artifacts
Access to the variant's buildable artifacts for build customization.
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,["# KotlinMultiplatformAndroidVariant\n=================================\n\n\n```\n@Incubating interface KotlinMultiplatformAndroidVariant : HasAndroidTest, HasUnitTest\n```\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nProperties for the main Variant of a kotlin multiplatform android library\n\nSummary\n-------\n\n| ### Public properties ||\n|---------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Artifacts](/reference/tools/gradle-api/8.2/com/android/build/api/artifact/Artifacts) | [artifacts](/reference/tools/gradle-api/8.2/com/android/build/api/variant/KotlinMultiplatformAndroidVariant#artifacts()) Access to the variant's buildable artifacts for build customization. |\n| [FileCollection](https://docs.gradle.org/current/javadoc/org/gradle/api/file/FileCollection.html) | [compileClasspath](/reference/tools/gradle-api/8.2/com/android/build/api/variant/KotlinMultiplatformAndroidVariant#compileClasspath()) Access to the variant's compile classpath. |\n| [Instrumentation](/reference/tools/gradle-api/8.2/com/android/build/api/variant/Instrumentation) | [instrumentation](/reference/tools/gradle-api/8.2/com/android/build/api/variant/KotlinMultiplatformAndroidVariant#instrumentation()) Access to the variant's instrumentation options. |\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [name](/reference/tools/gradle-api/8.2/com/android/build/api/variant/KotlinMultiplatformAndroidVariant#name()) The name of the variant |\n\n| ### Inherited properties ||\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| From class [com.android.build.api.variant.HasAndroidTest](/reference/tools/gradle-api/8.2/com/android/build/api/variant/HasAndroidTest) |---------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [AndroidTest](/reference/tools/gradle-api/8.2/com/android/build/api/variant/AndroidTest)`?` | [androidTest](/reference/tools/gradle-api/8.2/com/android/build/api/variant/HasAndroidTest#androidTest()) Variant's [AndroidTest](/reference/tools/gradle-api/8.2/com/android/build/api/variant/AndroidTest) configuration, or null if android tests are disabled for this variant. | |\n| From class [com.android.build.api.variant.HasUnitTest](/reference/tools/gradle-api/8.2/com/android/build/api/variant/HasUnitTest) |---------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [UnitTest](/reference/tools/gradle-api/8.2/com/android/build/api/variant/UnitTest)`?` | [unitTest](/reference/tools/gradle-api/8.2/com/android/build/api/variant/HasUnitTest#unitTest()) Variant's [UnitTest](/reference/tools/gradle-api/8.2/com/android/build/api/variant/UnitTest), or null if the unit tests for this variant are disabled. | |\n\nPublic properties\n-----------------\n\n### artifacts\n\n```\nval artifacts: Artifacts\n```\n\nAccess to the variant's buildable artifacts for build customization. \n\n### compileClasspath\n\n```\nval compileClasspath: FileCollection\n```\n\nAccess to the variant's compile classpath.\n\nThe returned [FileCollection](https://docs.gradle.org/current/javadoc/org/gradle/api/file/FileCollection.html) should not be resolved until execution time. \n\n### instrumentation\n\n```\nval instrumentation: Instrumentation\n```\n\nAccess to the variant's instrumentation options. \n\n### name\n\n```\nval name: String\n```\n\nThe name of the variant"]]