Skip to content

feat(gradle-plugin): default release mode to event - #739

Closed
ablaszkiewicz wants to merge 2 commits into
mainfrom
feat/event-release-mode-default
Closed

feat(gradle-plugin): default release mode to event#739
ablaszkiewicz wants to merge 2 commits into
mainfrom
feat/event-release-mode-default

Conversation

@ablaszkiewicz

@ablaszkiewicz ablaszkiewicz commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

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

  • Two Android releases that ship the same proguard mapping report their exceptions on one release.
  • The release that uploads the mapping first takes them.

Changes

  • posthog.releaseMode defaults to event.
  • The build uploads the proguard mapping without a release.
  • Each event resolves its own release from the $app_namespace, $app_version and $app_build the SDK sends.
  • posthog.releaseMode=symbol-set keeps the old behavior. POSTHOG_RELEASE_MODE=symbol-set does the same.
  • PostHogUploadProguardMappingsTask.register takes the same default.

How did you test this code?

  • ./gradlew :posthog-android-gradle-plugin:test and ./gradlew spotlessCheck detekt.
  • PostHogReleaseModeTest is new. resolvePostHogReleaseMode had no tests.
  • Not run: the functional tests. This change does not touch them.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Written with Claude Code (Opus 5).

The test helper builds its Project without apply {}. Project has its own apply(), so the scope function resolves to Gradle's method.

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
@ablaszkiewicz ablaszkiewicz self-assigned this Aug 31, 2026
@posthog

posthog Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

🦔 PostHog Review reviewed this pull request

Found 1 must fix, 1 should fix, 0 consider.

Published 2 findings (view the review).

@posthog

posthog Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

PostHog Review alpha 🦔 If you find any issues helpful - please reply "valid", "invalid", etc., for evaluation purposes 🙏

@posthog posthog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PostHog Review

Found 1 must fix, 1 should fix.

Comment thread .changeset/gradle-plugin-event-release-mode-default.md Outdated
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
@ablaszkiewicz

Copy link
Copy Markdown
Contributor Author

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.

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.

1 participant