Commit cf942dd
authored
Decouple generators from Anvil and move them to KSP (duckduckgo#8397)
Task/Issue URL:
https://app.asana.com/1/137249556945/project/1214119362406643/task/1214427159097979?focus=true
### Description
Move the code generators from Anvil compiler to KSP.
### Steps to test this PR
All tests pass, we have:
* existing integration tests
* new tests added in this PR
Also smoke test the app
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **High Risk**
> Replaces the custom `:anvil-compiler` annotation processor with a new
KSP-based processor and updates multiple modules’ build configuration;
codegen/DI wiring changes can break compilation or runtime bindings
across the app.
>
> **Overview**
> Migrates DuckDuckGo’s custom Anvil-based code generation off the
`:anvil-compiler` module and onto a new KSP module, `:anvil-ksp`.
>
> Updates affected Android modules to apply the KSP plugin and swap
`anvil project(':anvil-compiler')` for `ksp project(':anvil-ksp')`.
>
> Removes the Anvil `CodeGenerator` implementations (e.g., plugin
points, remote feature toggles, workers, view models, activity starters)
and introduces a KSP implementation for `@ContributeToActivityStarter`
(`ContributeToActivityStarterProcessor` + provider) that generates the
same activity/params mapper bindings and optional deeplink parsing
helpers.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
34598ec. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 62346e4 commit cf942dd
140 files changed
Lines changed: 6729 additions & 3208 deletions
File tree
- ad-click/ad-click-impl
- android-design-system
- design-system-internal
- design-system
- anrs
- anrs-impl
- anrs-internal
- anvil
- anvil-compiler
- src/main/java/com/duckduckgo/anvil/compiler
- anvil-ksp
- src
- main/java/com/duckduckgo/anvil/ksp
- test
- java/com/duckduckgo/anvil/ksp
- resources/golden
- app-tracking-protection
- vpn-impl
- vpn-internal
- app
- attributed-metrics
- attributed-metrics-impl
- attributed-metrics-internal
- autoconsent/autoconsent-impl
- autofill
- autofill-impl
- autofill-internal
- breakage-reporting/breakage-reporting-impl
- broken-site/broken-site-impl
- browser/browser-ui
- common/common-utils
- content-scope-scripts/content-scope-scripts-impl
- cookies/cookies-impl
- custom-tabs/custom-tabs-impl
- data-clearing/data-clearing-impl
- data-store/data-store-impl
- dax-prompts/dax-prompts-impl
- downloads/downloads-impl
- duckchat
- duckchat-impl
- duckchat-internal
- duckchat-store
- duckplayer/duckplayer-impl
- element-hiding/element-hiding-impl
- event-hub/event-hub-impl
- example-feature
- example-feature-impl
- example-feature-internal
- experiments/experiments-impl
- feature-toggles
- feature-toggles-impl
- feature-toggles-internal
- fingerprint-protection/fingerprint-protection-impl
- history/history-impl
- httpsupgrade/httpsupgrade-impl
- installation/installation-impl
- js-messaging/js-messaging-impl
- macos/macos-impl
- malicious-site-protection/malicious-site-protection-impl
- modal-coordinator/modal-coordinator-impl
- network-protection
- network-protection-impl
- network-protection-internal
- new-tab-page/new-tab-page-impl
- persistent-storage
- persistent-storage-dummy-impl
- persistent-storage-impl
- pir
- pir-impl
- pir-internal
- privacy-config
- privacy-config-impl
- privacy-config-internal
- privacy-dashboard/privacy-dashboard-impl
- remote-messaging
- remote-messaging-impl
- remote-messaging-internal
- request-filterer/request-filterer-impl
- request-interception/request-interception-impl
- runtime-checks/runtime-checks-impl
- saved-sites
- saved-sites-impl
- saved-sites-internal
- serp-logos/serp-logos-impl
- settings/settings-impl
- site-permissions/site-permissions-impl
- sqlcipher-loader/sqlcipher-loader-impl
- statistics/statistics-impl
- subscriptions
- subscriptions-dummy-impl
- subscriptions-impl
- subscriptions-internal
- survey/survey-impl
- sync
- sync-impl
- sync-settings-impl
- user-agent/user-agent-impl
- verified-installation/verified-installation-impl
- voice-search/voice-search-impl
- vpn-network/vpn-network-impl
- web-compat/web-compat-impl
- web-detection/web-detection-impl
- web-interference-detection/web-interference-detection-impl
- windows/windows-impl
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| |||
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
58 | | - | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | | - | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
This file was deleted.
Lines changed: 0 additions & 265 deletions
This file was deleted.


0 commit comments