Enum Class AndroidGradlePluginProjectFlags.BooleanFlag
- All Implemented Interfaces:
Serializable,Comparable<AndroidGradlePluginProjectFlags.BooleanFlag>,Constable
- Enclosing interface:
- AndroidGradlePluginProjectFlags
Studio uses the legacy default for AGPs that do not specifiy that flag.
Flags must never be removed from here. This is to avoid issues when the
current version of studio fetches models from a project that has a legacy flag set. They can
be marked as @Deprecated and the getter removed from
IdeAndroidGradlePluginProjectFlags
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionWhether the R class in applications and dynamic features has constant IDs.Whether the jetpack Compose feature is enabled for this project.Whether the ML model binding feature is enabled for this project.Whether the R class in instrumentation tests has constant IDs.Whether the R class generated for this project is transitive.Whether the Android Test Platform is enabled for this project. -
Method Summary
Modifier and TypeMethodDescriptionbooleanThe apparent value of this flag from Studio if it is not explicitly set in the AGP model.Returns the enum constant of this class with the specified name.values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
APPLICATION_R_CLASS_CONSTANT_IDS
Whether the R class in applications and dynamic features has constant IDs.If they are constant they can be inlined by the java compiler and used in places that require constants such as annotations and cases of switch statements.
-
TEST_R_CLASS_CONSTANT_IDS
Whether the R class in instrumentation tests has constant IDs.If they are constant they can be inlined by the java compiler and used in places that require constants such as annotations and cases of switch statements.
-
TRANSITIVE_R_CLASS
Whether the R class generated for this project is transitive.If it is transitive it will contain all of the resources defined in its transitive dependencies alongside those defined in this project. If non-transitive it will only contain the resources defined in this project.
-
JETPACK_COMPOSE
Whether the jetpack Compose feature is enabled for this project. -
ML_MODEL_BINDING
Whether the ML model binding feature is enabled for this project. -
UNIFIED_TEST_PLATFORM
Whether the Android Test Platform is enabled for this project.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getLegacyDefault
public boolean getLegacyDefault()The apparent value of this flag from Studio if it is not explicitly set in the AGP model.As Studio can open projects from older Android Gradle Plugins this is used in
IdeAndroidGradlePluginProjectFlagsto supply a value if it was not supplied by the build system.This could be used because:
- The AGP version used does not support this model at all.
- The AGP version used supports this model but predates the introduction of this flag.
- The AGP version used supports this model and this flag but did not explicitly set a value for it.
-