feat(gradle-plugin): default release mode to event - #739
Conversation
The proguard mapping uploads release-independent by default, and each event resolves its own release. Set posthog.releaseMode=symbol-set to keep stamping the release onto the mapping. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jg6r6rFUBnowrXssZyU7yR
🦔 PostHog Review reviewed this pull requestFound 1 must fix, 1 should fix, 0 consider. Published 2 findings (view the review). |
|
PostHog Review alpha 🦔 If you find any issues helpful - please reply "valid", "invalid", etc., for evaluation purposes 🙏 |
The release note said 0.12.0. That version rejects --release-mode on proguard upload. 0.13.0 added the flag. 0.11.0 added it to the sourcemap commands, which is where the wrong number came from. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jg6r6rFUBnowrXssZyU7yR
|
Closing this. We are removing event release mode from this package instead of defaulting to it. Event mode only helps when two releases ship a byte-identical artifact. The symbol id is a content hash on every platform, so an ordinary feature release already gets its own symbol set and never collides. The case that does collide is a React Native release that changes only JavaScript, where the native artifact repeats. Against that narrow benefit, the mobile paths carry real cost. A dSYM upload covers every embedded target but creates one release, so an extension crash resolves no release once the binding is gone. A replacement PR follows that removes the mode from this package. The flag was experimental and undocumented, so the removal is direct. |
Related PRs
Event mode is live today. Each build must ask for it. These PRs make it the default. The modes themselves do not change.
Problem
Changes
posthog.releaseModedefaults toevent.$app_namespace,$app_versionand$app_buildthe SDK sends.posthog.releaseMode=symbol-setkeeps the old behavior.POSTHOG_RELEASE_MODE=symbol-setdoes the same.PostHogUploadProguardMappingsTask.registertakes the same default.How did you test this code?
./gradlew :posthog-android-gradle-plugin:testand./gradlew spotlessCheck detekt.PostHogReleaseModeTestis new.resolvePostHogReleaseModehad no tests.🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Written with Claude Code (Opus 5).
The test helper builds its
Projectwithoutapply {}.Projecthas its ownapply(), so the scope function resolves to Gradle's method.