Skip to content

refactor: organize repository as a pub workspace#312

Open
marandaneto wants to merge 3 commits intomainfrom
refactor/pub-workspace
Open

refactor: organize repository as a pub workspace#312
marandaneto wants to merge 3 commits intomainfrom
refactor/pub-workspace

Conversation

@marandaneto
Copy link
Member

💡 Motivation and Context

Organizes the repository as a Dart pub workspace to enable better multi-package management and shared dependency resolution.

What changed

  • Moved the plugin package into posthog_flutter/ subdirectory (with all native code: android/, ios/, macos/, lib/, test/)
  • Created a workspace root pubspec.yaml that declares posthog_flutter and example as workspace members
  • Added resolution: workspace to both member pubspec.yaml files
  • Bumped SDK constraint to ^3.5.0 (minimum for workspace support)
  • Aligned flutter_lints version across workspace (^5.0.0)

CI / Release updates

  • ci.yml: Simplified to single flutter pub get at root (workspace resolves all); test runs from ./posthog_flutter
  • publish-pub-dev.yml: Version validation reads from posthog_flutter/pubspec.yaml; flutter pub publish runs from ./posthog_flutter; changelog read from posthog_flutter/CHANGELOG.md
  • codeql.yml: Simplified dependency install to single flutter pub get
  • publish.yml: No changes needed (uses setup action + scripts)
  • setup/action.yml: No changes needed (single flutter pub get resolves workspace)

Other updates

  • scripts/bump-version.sh: All paths prefixed with posthog_flutter/
  • Makefile: Paths updated for new structure
  • RELEASING.md: Manual publish instructions updated

💚 How did you test it?

  • flutter pub get resolves successfully at workspace root
  • All 93 tests pass (flutter test from posthog_flutter/)
  • dart analyze passes (only pre-existing info-level warnings in example)

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

@marandaneto marandaneto requested a review from a team as a code owner February 28, 2026 12:54
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