Skip to content

chore: [ANDROSDK-2241] update koin to 4.2.2 and migrate to the compiler plugin#2659

Merged
vgarciabnz merged 3 commits into
developfrom
ANDROSDK-2241
Jul 6, 2026
Merged

chore: [ANDROSDK-2241] update koin to 4.2.2 and migrate to the compiler plugin#2659
vgarciabnz merged 3 commits into
developfrom
ANDROSDK-2241

Conversation

@taridepaco

@taridepaco taridepaco commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Updates Koin from 3.5.6 to 4.2.2 and replaces the KSP-based Koin Annotations processor with the new Koin Compiler Plugin (1.0.1), which requires Kotlin 2.3.20. This unblocks KSP2, so the ksp.useKSP2=false workaround is removed and KSP is updated to 2.3.9 (now only used by Room and the internal DAO processor). Module registration in D2DIComponentFactory moves from the generated XxxDIModule().module extensions to the plugin's typed modules(KClass...) API. The last classes registered through the classic DSL (javaDIClasses) are migrated to Kotlin and annotated with @Singleton, so the whole graph is now annotation-based.

With the DSL module gone, the plugin's compile-time dependency verification (compileSafety) is kept enabled for the main compilation. This required declaring explicit includes in the Network, Persistence and Wipe DI modules (real cross-module dependencies that the checker cannot resolve reliably otherwise), disabling strictSafety, and turning the checker off for test compilations, where it runs against a partial definition index and reports false positives. If spurious KOIN-D001 errors ever show up in CI, the fix is either adding the corresponding include or disabling compileSafety until the plugin matures.

Note: this branch is stacked on top of #2658 (ANDROSDK-2340); the diff will narrow down to the Koin changes once that PR is merged.

Related task: ANDROSDK-2241

@sonarqubecloud

sonarqubecloud Bot commented Jul 3, 2026

Copy link
Copy Markdown

@vgarciabnz vgarciabnz changed the base branch from develop to master July 6, 2026 10:04
@vgarciabnz vgarciabnz changed the base branch from master to develop July 6, 2026 10:04

@vgarciabnz vgarciabnz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really don't understand why the WipeDIModule needs the declaration of the rest of the modules, but it fails if not added. We can check when @taridepaco is back.

@vgarciabnz vgarciabnz merged commit 673067d into develop Jul 6, 2026
11 checks passed
@vgarciabnz vgarciabnz deleted the ANDROSDK-2241 branch July 6, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants