Commit 20adecb
Update Hilt's Gradle Plugin detection of AGP
Use both the base id 'com.android.base' and the base type 'com.android.build.gradle.api.AndroidBasePlugin' as to maximize compatibility on cases when one works and the other doesn't.
Fixes #4734
RELNOTES=Updated Hilt's Gradle Plugin detection of AGP to maximize compatibility and avoid the confusing 'The Hilt Android Gradle plugin can only be applied to an Android project.' error when the plugin is on an Android project.
PiperOrigin-RevId: 7973266811 parent ec7f76f commit 20adecb
1 file changed
Lines changed: 13 additions & 4 deletions
File tree
- java/dagger/hilt/android/plugin/main/src/main/kotlin/dagger/hilt/android/plugin
Lines changed: 13 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| |||
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
| 74 | + | |
72 | 75 | | |
73 | | - | |
| 76 | + | |
74 | 77 | | |
75 | | - | |
76 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
77 | 86 | | |
78 | 87 | | |
79 | | - | |
| 88 | + | |
80 | 89 | | |
81 | 90 | | |
82 | 91 | | |
| |||
0 commit comments