Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hilt 2.38 @AndroidEntryPoint/@HiltAndroidApp transform doesn't run on non-test code on AGP 7+ #2784

Closed
Chang-Eric opened this issue Jul 26, 2021 · 3 comments

Comments

@Chang-Eric
Copy link
Member

A bug in 2.38 is causing the bytecode transform to miss non-test code when running on AGP 7+. This causes the base class of those @AndroidEntryPoint types to remain the declared base class as opposed to the Hilt one, which means injection won't occur on these classes. This is unfortunately generally a runtime error.

A fix will be coming shortly as well as a patch release 2.38.1 to fix this.

@Chang-Eric Chang-Eric self-assigned this Jul 26, 2021
copybara-service bot pushed a commit that referenced this issue Jul 26, 2021
…t applied to non-test code.

Also add AGP 7.0.0-beta04 to the AGP versions we test.

Fixes #2784.

RELNOTES=Fix bug where on AGP 7.0+ the Gradle plugin bytecode transform was not applied to non-test code (#2784)
PiperOrigin-RevId: 386950877
copybara-service bot pushed a commit that referenced this issue Jul 26, 2021
…t applied to non-test code.

Also add AGP 7.0.0-beta04 to the AGP versions we test.

Fixes #2784.

RELNOTES=Fix bug where on AGP 7.0+ the Gradle plugin bytecode transform was not applied to non-test code (#2784)
PiperOrigin-RevId: 386950877
@Chang-Eric Chang-Eric reopened this Jul 27, 2021
@Chang-Eric
Copy link
Member Author

Leaving this open until 2.38.1 goes out.

@Chang-Eric
Copy link
Member Author

2.38.1 has been released now, so closing this.

@kevinbowie
Copy link

thank you now it works. mine now is kotlin 1.5.21 and hilt 2.38.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants