Skip to content

Conversation

@copybara-service
Copy link

Prevent KAPT from logging errors when compiling modules without entry points.

When Hilt Android is run on a module that contains no entry points, KAPT will log an error about disableAndroidSuperclassValidation not being a support option. This is because the Hilt Gradle plugin will add this option when applied but if no entry points exists, no processor actually accepts that option.

With this fix, all Hilt processors accept these options (though they are unused). This will prevent KAPT from logging these warnings in most cases.

It is still possible for warnings to be logged, for example if the Hilt plugin is applied, but Hilt isn't used but for those cases the user can simply skip applying the plugin.

Fixes #2040
Closes #2372

RELNOTES="Reduce the possibility of KAPT logging warnings due to no processor supporting disableAndroidSuperclassValidation when no Android entry points are in the source module."

@google-cla google-cla bot added the cla: yes label Mar 4, 2021
@copybara-service copybara-service bot merged commit c70cf2d into master Mar 4, 2021
@copybara-service copybara-service bot deleted the test_360770265 branch March 4, 2021 06:18
@ZerroCooL32not
Copy link

Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hilt: Compiler processor doesn't recognize options dagger.fastInit, dagger.hilt.android.internal.disableAndroidSuperclassValidation

1 participant