chore: opt in to publishing shared KMP module (com.onesignal:kmp)#2690
Closed
abdulraqeeb33 wants to merge 16 commits into
Closed
chore: opt in to publishing shared KMP module (com.onesignal:kmp)#2690abdulraqeeb33 wants to merge 16 commits into
abdulraqeeb33 wants to merge 16 commits into
Conversation
…otel replacement Introduces a new Kotlin Multiplatform `logger` module that mirrors the decoupled architecture of the `otel` module but has zero OpenTelemetry dependency, so the same observability pipeline can be shared with iOS. - commonMain: LogRecord/LogSeverity model, platform/logger/telemetry/crash interfaces, hand-rolled OTLP/JSON encoder, coroutine batch processor, remote + crash-local telemetry, crash reporter/uploader, and LoggerFactory composition root. - HTTP, file IO, clock and uuid are injected (no Ktor/okio); iOS actuals stubbed. - commonTest: unit tests for encoder, fields, batching, telemetry, crash flows. - core: Android adapters (logger, platform provider, HTTP sender, file store, crash handler, ANR detector) + LoggerLifecycleManager, wired behind a single LoggerModuleSwitch.USE_LOGGER_MODULE toggle (default false keeps the otel path and all existing tests unchanged). Logging gains a parallel logger sink. otel module left intact; removal tracked as follow-up. Co-authored-by: Cursor <cursoragent@cursor.com>
…its, and background I/O Switch the KMP logger module's wire format from OTLP/JSON to OTLP/protobuf (application/x-protobuf) via a dependency-free ProtoWriter, so the ingestion endpoint receives byte-compatible payloads with the old otel exporter. - Encode via hand-rolled ProtoWriter; drop kotlinx.serialization + OtlpDtos. - Port otel LogLimits: cap log-record attributes at 128 and truncate values to 32,000 chars (bounds long exception.stacktrace). - Make ILogFileStore.listReadable/delete suspend; run file I/O off-thread. - Route OneSignalLogHttpSender diagnostics through ILogger, gated on the exporter-logging toggle instead of unconditional logcat. - Add independent protobuf decode tests (ProtoTestReader) and limit tests. - Fix stale OTLP/JSON doc comments. Co-authored-by: Cursor <cursoragent@cursor.com>
…KMP-SDK submodule Extract the multiplatform :logger module into the standalone OneSignal-KMP-SDK repo (single source of truth for Android + iOS parity) and consume it here as a git submodule pinned to a commit. Remap the :OneSignal:logger project directory to the submodule so the existing project path and dependency substitution are unchanged. Fetch submodules recursively in every CI checkout that compiles the SDK, and document the clone/init workflow in CONTRIBUTING and README. Co-authored-by: Cursor <cursoragent@cursor.com>
…main Re-point the logger submodule from the feature-branch commit to the squash-merged main commit (503d610, PR #1). Logger sources are identical to the previously verified commit; :OneSignal:logger:testDebugUnitTest stays green. Co-authored-by: Cursor <cursoragent@cursor.com>
Companion to OneSignal-KMP-SDK#3 — FileLogStore reports persistence success, and crash/ANR handlers call saveCrash synchronously. Co-authored-by: Cursor <cursoragent@cursor.com>
Reusable (workflow_call) job the OneSignal-KMP-SDK Release workflow invokes to re-point the submodule gitlink to a released tag and open a bump PR here. Mirrors the OneSignal/sdk-shared fan-out pattern and authenticates with the shared org GH_PUSH_TOKEN, so no dedicated GitHub App is needed. Co-authored-by: Cursor <cursoragent@cursor.com>
…logger path Brings the KMP logger path to parity with the otel path after merging main (SDK-4822): - AndroidLogAnrDetector is now app-state aware, reusing the shared AnrCheckEvaluator (same tested decision core as OtelAnrDetector): foreground blocks report a fatal ANR via saveCrash; backgrounded blocks report a non-fatal warning via saveNonFatal under a distinct exception type + stack fingerprint, so they stay out of the ANR metric. - Wire isAppInForeground from the platform provider's appState in LoggerLifecycleManager. - Crash/ANR handlers call the synchronous saveCrash/saveNonFatal (no runBlocking), matching the fatal-handler-safe crash API. - Bump OneSignal-KMP-SDK submodule to 9cf1a33 (adds saveNonFatal + ossdk.crash.fatal). Co-authored-by: Cursor <cursoragent@cursor.com>
Companion to KMP revert of the sync crash API — durability remains the blocking ILogFileStore.save; hosts block the fatal handler until complete. Co-authored-by: Cursor <cursoragent@cursor.com>
Companion to KMP restoring synchronous ILogCrashReporter entry points. Co-authored-by: Cursor <cursoragent@cursor.com>
The bump PR now embeds the published OneSignal-KMP-SDK release notes for the target tag (fetched best-effort via gh; falls back to linking the release page) so a reviewer can see what the new logger version contains before merging. Re-runs refresh the PR body via `gh pr edit`. Co-authored-by: Cursor <cursoragent@cursor.com>
Add a "Working on the shared :logger module" section explaining the nested two-git model and two Mermaid flowcharts: Flow A (local edit → commit → push → merge to KMP main, no tag) and Flow B (manual Release workflow → tag + Android submodule-bump PR). Co-authored-by: Cursor <cursoragent@cursor.com>
Needed so the logger module can stamp and verify vX.Y.* provenance under actions/checkout's shallow submodule clone. Co-authored-by: Cursor <cursoragent@cursor.com>
Align the wrapped exceptionMessage argument to satisfy spotlessCheck. Co-authored-by: Cursor <cursoragent@cursor.com>
…GING flag Replace the hardcoded LoggerModuleSwitch.USE_LOGGER_MODULE boolean with a remote-config-driven decision. Add the SDK_CUSTOM_LOGGING feature flag (APP_STARTUP activation) and resolve it during early init directly from the cached config in SharedPreferences via OtelIdResolver.resolveCustomLoggingEnabled(), so toggling the flag takes effect on the next app start rather than mid-session. Add unit tests covering resolveCustomLoggingEnabled() (present/absent, case-insensitive, empty/missing flags, no config, null context, invalid JSON), the LoggerModuleSwitch.useLoggerModule() end-to-end read, and the SDK_CUSTOM_LOGGING enum key + activation mode. Co-authored-by: Cursor <cursoragent@cursor.com>
abdulraqeeb33
force-pushed
the
feat/SDK-4835-custom-logging-feature-flag
branch
from
July 23, 2026 19:40
862ab49 to
38d85c3
Compare
Contributor
📊 Diff Coverage Report✓ Coverage check passed (no source files changed) |
Add the onesignalPublishSharedKmp host opt-in flag so the Android SDK release publishes the shared :kmp module (sourced from the OneSignal-KMP-SDK submodule) to Maven Central, making the com.onesignal:kmp coordinate referenced by :core's POM resolvable for consumers. Co-authored-by: Cursor <cursoragent@cursor.com>
abdulraqeeb33
force-pushed
the
feat/SDK-4835-kmp-publish-flag
branch
from
July 23, 2026 20:05
ebd49e0 to
3b1bd56
Compare
abdulraqeeb33
force-pushed
the
feat/SDK-4835-custom-logging-feature-flag
branch
from
July 23, 2026 20:17
38d85c3 to
4c503a1
Compare
fadi-george
approved these changes
Jul 23, 2026
fadi-george
requested changes
Jul 23, 2026
fadi-george
left a comment
Contributor
There was a problem hiding this comment.
rebase branches properly as theres duplicate changes
abdulraqeeb33
force-pushed
the
feat/SDK-4835-custom-logging-feature-flag
branch
from
July 24, 2026 05:39
4c503a1 to
f791338
Compare
Contributor
Author
|
Closing as redundant. The KMP publishing opt-in (com.onesignal:kmp) already landed on |
An error occurred while trying to automatically change base from
feat/SDK-4835-custom-logging-feature-flag
to
main
July 24, 2026 06:06
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.
Summary
Small stacked PR (on top of #2688) that adds only the host opt-in flag for publishing the shared KMP module.
onesignalPublishSharedKmp = true(with an explanatory comment block) toOneSignalSDK/gradle.properties.:kmpmodule (sourced from theOneSignal-KMP-SDKsubmodule) to Maven Central, so thecom.onesignal:kmpcoordinate referenced by:core's POM resolves for consumers.build.gradleonly wires up Maven publishing when this flag is set; the standalone KMP repo build and the iOS host (which ships an XCFramework) never set it.settings.gradlemodule remap — those live on the integration branch.Test plan
onesignalPublishSharedKmpproperty is picked up during a release build so the:kmpmodule's Maven publishing tasks are registered.Made with Cursor