Stay organized with collections
Save and categorize content based on your preferences.
CanMinifyCode
@Incubating interface CanMinifyCode
Interface for component that can minify code
Summary
Public properties |
Boolean |
Specifies whether code will be minified.
|
Public properties
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,["# CanMinifyCode\n=============\n\n\n```\n@Incubating interface CanMinifyCode\n```\n\n\u003cbr /\u003e\n\nKnown direct subclasses \n[ApplicationVariant](/reference/tools/gradle-api/8.1/com/android/build/api/variant/ApplicationVariant), [LibraryVariant](/reference/tools/gradle-api/8.1/com/android/build/api/variant/LibraryVariant) \n\n|--------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------|\n| [ApplicationVariant](/reference/tools/gradle-api/8.1/com/android/build/api/variant/ApplicationVariant) | Properties for the main Variant of an application. |\n| [LibraryVariant](/reference/tools/gradle-api/8.1/com/android/build/api/variant/LibraryVariant) | [Variant](/reference/tools/gradle-api/8.1/com/android/build/api/variant/Variant) for Library projects |\n\n*** ** * ** ***\n\nInterface for component that can minify code\n\nSummary\n-------\n\n| ### Public properties ||\n|------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [isMinifyEnabled](/reference/tools/gradle-api/8.1/com/android/build/api/variant/CanMinifyCode#isMinifyEnabled()) Specifies whether code will be minified. |\n\nPublic properties\n-----------------\n\n### isMinifyEnabled\n\n```\nval isMinifyEnabled: Boolean\n```\n\nSpecifies whether code will be minified. At this point the value is final. You can change it via [AndroidComponentsExtension.beforeVariants](/reference/tools/gradle-api/8.1/com/android/build/api/variant/AndroidComponentsExtension#beforeVariants(com.android.build.api.variant.VariantSelector,kotlin.Function1)) and [CanMinifyCodeBuilder.isMinifyEnabled](/reference/tools/gradle-api/8.1/com/android/build/api/variant/CanMinifyCodeBuilder#isMinifyEnabled())"]]