Skip to content

Commit

Permalink
Revert Hilt internal entry point and modules back to public to avoid …
Browse files Browse the repository at this point in the history
…r8 optimization issues.

This CL is a partial rollback of changes made in CL/351213437 when introducing TestInstallIn. Making these classes pkg-private was mostly just a precaution. Making these public again should be fine since AggeregatedDepsProcessor prevents using TestInstallIn from replacing dagger.hilt modules.

See #2291

RELNOTES=Partially Fixes 2291: Reverts Hilt internal entry point and modules back to public to avoid r8 optimization issues. The full fix on our side (until r8 bug is fixed) will be to ship a proguard config that keeps the HiltWrapper_ classes. This will be done in a future release.
PiperOrigin-RevId: 353064986
  • Loading branch information
bcorso authored and Dagger Team committed Jan 21, 2021
1 parent 850274b commit 7a3d6fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Expand Up @@ -152,14 +152,14 @@ interface ActivityModule {
/** The activity entry point to retrieve the factory. */
@EntryPoint
@InstallIn(ActivityComponent.class)
interface ActivityEntryPoint {
public interface ActivityEntryPoint {
InternalFactoryFactory getHiltInternalFactoryFactory();
}

/** The fragment entry point to retrieve the factory. */
@EntryPoint
@InstallIn(FragmentComponent.class)
interface FragmentEntryPoint {
public interface FragmentEntryPoint {
InternalFactoryFactory getHiltInternalFactoryFactory();
}

Expand Down
Expand Up @@ -46,9 +46,10 @@
*/
public final class HiltViewModelFactory implements ViewModelProvider.Factory {

/** Hilt entry point for getting the multi-binding map of ViewModels. */
@EntryPoint
@InstallIn(ViewModelComponent.class)
interface ViewModelFactoriesEntryPoint {
public interface ViewModelFactoriesEntryPoint {
@HiltViewModelMap
Map<String, Provider<ViewModel>> getHiltViewModelMap();
}
Expand Down

0 comments on commit 7a3d6fb

Please sign in to comment.