Repository navigation
v2.3.9 Hot fix
·
224 commits
to main
since this release
[2.3.9] - 2026-04-11
Fixed
Android: Missing foreground service permissions cause SecurityException at runtime (HIGH)
- Root cause: The library's
AndroidManifest.xmldid not declareFOREGROUND_SERVICEorFOREGROUND_SERVICE_DATA_SYNC.KmpHeavyWorker.setForeground()throwsSecurityExceptionon Android 9+ withoutFOREGROUND_SERVICE, and on Android 14+ withoutFOREGROUND_SERVICE_DATA_SYNCwhen usingFOREGROUND_SERVICE_TYPE_DATA_SYNC. - Fixed by adding both
<uses-permission>declarations to the library manifest. Android Gradle plugin merges these automatically into the consumer app'sAndroidManifest.xml.
KSP: Workers with an intermediate base class silently excluded from generated factory (HIGH)
- Root cause:
WorkerProcessorusedclassDecl.superTypesto check forAndroidWorker/IosWorker— inspecting only the direct parent. A class extending a custom base (e.g.class MyWorker : BaseAppWorker()whereBaseAppWorker : AndroidWorker) was silently skipped. At runtime these tasks failed with "worker not found". - Fixed:
extendsWorkerType()now traverses the full inheritance hierarchy with a cycle guard.
Android: Deprecated 2-arg constructor throws cryptic NPE instead of actionable error (LOW)
- Root cause:
BaseKmpWorker(Context, WorkerParameters)andKmpHeavyWorker(Context, WorkerParameters)calledKmpWorkManagerKoin.getKoin().get()without a try-catch. An uninitialised Koin threwIllegalStateExceptionwith a generic message, with no hint for the developer. - Fixed: the call is now wrapped in a try-catch that rethrows with a clear message pointing to
KmpWorkManager.initialize()andKmpWorkerFactory.
Added
KSP: @Worker(aliases = [...]) for safe class renames
- Workers can now declare one or more alias names that also resolve to the same factory lambda. Safe rename path: add the old simple name to
aliases, remove it once all devices have drained their queues. - Example:
@Worker(name = "SyncWorkerV2", aliases = ["SyncWorker"]).
KSP: ProGuard / rename warning when name is absent
WorkerProcessornow emits alogger.warn(...)at build time when@Workerhas no explicitnameargument. The generated key defaults to the simple class name, which breaks persisted tasks on rename or ProGuard obfuscation.- Fix: add
@Worker(name = "StableIdentifier").
Changed
iOS: IosFileStorage — removed deprecated DELETED_MARKER_MAX_AGE_MS constant
IosFileStorage.Companion.DELETED_MARKER_MAX_AGE_MSwas marked@Deprecatedsince v2.3.4. It is now removed. UseIosFileStorageConfig.deletedMarkerMaxAgeMsinstead.
Tests
- New
KmpWorkerForegroundInfoCompatTest.testHeavyTask_onApi31Plus_schedulesWithoutSecurityException— verifiesKmpHeavyWorkerschedules withoutSecurityExceptionon any API level. - New
WorkerProcessorTest.testCodeGeneration_IndirectAndroidInheritance_GeneratesFactoryandtestCodeGeneration_IndirectIosInheritance_GeneratesFactory— regression tests for the deep-inheritance KSP fix. - New
WorkerProcessorTest.testCodeGeneration_WrongBaseClass_EmitsWarning_SkipsWorker— verifies workers not extendingAndroidWorker/IosWorkerare excluded with a warning. - New
WorkerProcessorTest.testCodeGeneration_AliasesGenerateAdditionalEntries— verifies alias entries are generated in the factory map.