Class HiltCompilerOptions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckWrongAndDeprecatedOptions(androidx.room.compiler.processing.XProcessingEnv env) static GradleProjectTypegetGradleProjectType(androidx.room.compiler.processing.XProcessingEnv env) Returns project type or null if Hilt Gradle Plugin is not applied.static booleanisAndroidSuperClassValidationDisabled(androidx.room.compiler.processing.XTypeElement element) Returnstrueif the superclass validation is disabled for-annotated classes.invalid @link
dagger.hilt.android.AndroidEntryPointstatic booleanisAssistedInjectViewModelsEnabled(androidx.room.compiler.processing.XTypeElement viewModelElement) static booleanisCrossCompilationRootValidationDisabled(com.google.common.collect.ImmutableSet<androidx.room.compiler.processing.XTypeElement> rootElements, androidx.room.compiler.processing.XProcessingEnv env) Returnstrueif cross-compilation root validation is disabled.static booleanisModuleInstallInCheckDisabled(androidx.room.compiler.processing.XProcessingEnv env) Returnstrueif the check foris disabled.invalid @link
dagger.hilt.InstallInstatic booleanisSharedTestComponentsEnabled(androidx.room.compiler.processing.XProcessingEnv env) Returnstrueof unit tests should try to share generated components, rather than using separate generated components per Hilt test root.static booleanuseAggregatingRootProcessor(androidx.room.compiler.processing.XProcessingEnv env) Returnstrueif the aggregating processor is enabled (default istrue).
-
Constructor Details
-
HiltCompilerOptions
public HiltCompilerOptions()
-
-
Method Details
-
isAndroidSuperClassValidationDisabled
public static boolean isAndroidSuperClassValidationDisabled(androidx.room.compiler.processing.XTypeElement element) Returnstrueif the superclass validation is disabled for-annotated classes.invalid @link
dagger.hilt.android.AndroidEntryPointThis flag is for internal use only! The superclass validation checks that the super class is a generated
Hilt_class. This flag is disabled by the Hilt Gradle plugin to enable bytecode transformation to change the superclass. -
isCrossCompilationRootValidationDisabled
public static boolean isCrossCompilationRootValidationDisabled(com.google.common.collect.ImmutableSet<androidx.room.compiler.processing.XTypeElement> rootElements, androidx.room.compiler.processing.XProcessingEnv env) Returnstrueif cross-compilation root validation is disabled.This flag should rarely be needed, but may be used for legacy/migration purposes if tests require the use of
rather thaninvalid @link
dagger.hilt.android.HiltAndroidApp.invalid @link
dagger.hilt.android.testing.HiltAndroidTestNote that Hilt still does validation within a single compilation unit. In particular, a compilation unit that contains a
HiltAndroidAppusage cannot have otherHiltAndroidApporHiltAndroidTestusages in the same compilation unit. -
isModuleInstallInCheckDisabled
public static boolean isModuleInstallInCheckDisabled(androidx.room.compiler.processing.XProcessingEnv env) Returnstrueif the check foris disabled.invalid @link
dagger.hilt.InstallIn -
useAggregatingRootProcessor
public static boolean useAggregatingRootProcessor(androidx.room.compiler.processing.XProcessingEnv env) Returnstrueif the aggregating processor is enabled (default istrue).Note:This is for internal use only!
-
getGradleProjectType
public static GradleProjectType getGradleProjectType(androidx.room.compiler.processing.XProcessingEnv env) Returns project type or null if Hilt Gradle Plugin is not applied.Note:This is for internal use only!
-
isAssistedInjectViewModelsEnabled
public static boolean isAssistedInjectViewModelsEnabled(androidx.room.compiler.processing.XTypeElement viewModelElement) -
checkWrongAndDeprecatedOptions
public static void checkWrongAndDeprecatedOptions(androidx.room.compiler.processing.XProcessingEnv env) -
getProcessorOptions
-