Open
Conversation
added 2 commits
January 16, 2026 15:11
Major enhancement making KMP WorkManager dependency injection framework agnostic. ## Breaking Changes - None! 100% backward compatible with v2.0.0 when using kmpworkmanager-koin extension ## Added - WorkerManagerConfig: Global service locator for DI-agnostic factory registration - WorkerManagerInitializer: Unified initialization API (expect/actual pattern) - AndroidWorkerFactoryProvider/IosWorkerFactoryProvider: Type-safe factory accessors - IosTaskHandlerRegistry: Lazy-initialized task executors for iOS - kmpworkmanager-koin extension module: Optional Koin integration (v2.1.0) - WorkerManagerConfigTest: Unit tests for new configuration system ## Changed - Core library: Removed Koin dependencies (koin-core, koin-android) - KmpWorker/KmpHeavyWorker: Use AndroidWorkerFactoryProvider instead of Koin injection - Version: 2.0.0 → 2.1.0 ## Moved - Koin modules: Moved from core to kmpworkmanager-koin extension - KoinModule.kt → kmpworker-koin/src/commonMain - KoinModule.android.kt → kmpworker-koin/src/androidMain - KoinModule.ios.kt → kmpworker-koin/src/iosMain ## Documentation - Added: docs/migration-v2.1.0.md - Complete migration guide - Updated: CHANGELOG.md with v2.1.0 release notes - Updated: README.md with installation options (Manual/Koin/Hilt) ## Benefits - Zero dependencies: Core library has no DI framework requirements - Flexible integration: Choose your DI solution (Koin, Hilt, manual) - Smaller binary size: Only include DI framework if needed - Easier testing: Simple manual initialization for tests - Backward compatible: Existing Koin code works with extension module
Implements comprehensive demo app showcasing DI-agnostic architecture: **New Features:** - Product flavors for 3 DI approaches: manual, koin, hilt - Flavor-specific Application classes with proper initialization - Simple DemoScreen UI showing current DI approach - Cross-platform DemoWorker implementation **Demo Structure:** - Manual flavor: Direct WorkerManagerInitializer.initialize() - Koin flavor: Uses kmpworkmanager-koin extension module - Hilt flavor: Placeholder for future kmpworkmanager-hilt module **Build Variants:** - assembleManualDebug - Zero dependencies demo - assembleKoinDebug - Koin integration demo - assembleHiltDebug - Hilt integration demo (placeholder) **Removed:** - Old complex demo UI (App.kt) - Old Koin-dependent Application class - Deprecated debug and push notification code All 3 variants build successfully and demonstrate the library's flexibility across different DI strategies.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add DI agnostic