Skip to content

Refactor: move package into a monorepo #519

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 104 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
e0c0fd2
feat: add private view
ahmedAlaaInstabug Oct 2, 2024
c38dead
feat: add private view
ahmedAlaaInstabug Oct 2, 2024
23d3912
Merge remote-tracking branch 'refs/remotes/origin/dev' into feat/priv…
ahmedAlaaInstabug Oct 2, 2024
1af3598
feat: add private view
ahmedAlaaInstabug Oct 2, 2024
0476bcd
feat: add private view
ahmedAlaaInstabug Oct 2, 2024
9b8ec64
feat: add private view
ahmedAlaaInstabug Oct 2, 2024
cedc297
feat: add private view
ahmedAlaaInstabug Oct 7, 2024
59c1ffa
feat: add private view
ahmedAlaaInstabug Oct 9, 2024
f7f8f08
feat: add private view android integration
ahmedAlaaInstabug Oct 10, 2024
c9bb481
feat: add private view android integration
ahmedAlaaInstabug Oct 10, 2024
52bced3
feat: add private view android integration
ahmedAlaaInstabug Oct 10, 2024
322ea6e
refactor: make mono-repo
ahmedAlaaInstabug Oct 17, 2024
f3e04e9
refactor: make mono-repo
ahmedAlaaInstabug Oct 20, 2024
b4e4ea7
refactor: make mono-repo
ahmedAlaaInstabug Oct 20, 2024
9501091
refactor: make mono-repo
ahmedAlaaInstabug Oct 20, 2024
e3f9ca5
refactor: make mono-repo
ahmedAlaaInstabug Oct 20, 2024
1808746
refactor: make mono-repo
ahmedAlaaInstabug Oct 20, 2024
8bfb3b7
refactor: make mono-repo
ahmedAlaaInstabug Oct 20, 2024
d8023a5
refactor: make mono-repo
ahmedAlaaInstabug Oct 20, 2024
9a097b7
refactor: make mono-repo
ahmedAlaaInstabug Oct 20, 2024
907daf3
refactor: make mono-repo
ahmedAlaaInstabug Oct 20, 2024
7fc99ca
refactor: make mono-repo
ahmedAlaaInstabug Oct 20, 2024
609c99f
refactor: make mono-repo
ahmedAlaaInstabug Oct 20, 2024
b5dad7b
refactor: make mono-repo
ahmedAlaaInstabug Oct 20, 2024
7d2cc4d
refactor: add http-package to mono-repo
ahmedAlaaInstabug Oct 20, 2024
b163d10
refactor: add http-package to mono-repo
ahmedAlaaInstabug Oct 20, 2024
0659b38
refactor: add http-package to mono-repo
ahmedAlaaInstabug Oct 20, 2024
723f254
refactor: add http-package to mono-repo
ahmedAlaaInstabug Oct 20, 2024
5447fbd
refactor: add http-package to mono-repo
ahmedAlaaInstabug Oct 20, 2024
8c13ff0
refactor: add http-package to mono-repo
ahmedAlaaInstabug Oct 20, 2024
6aba7da
refactor: add dio interceptor to mono-repo
ahmedAlaaInstabug Oct 21, 2024
5bfe807
refactor: add dio interceptor to mono-repo
ahmedAlaaInstabug Oct 21, 2024
3e0653f
refactor: add modular plugin to mono-repo
ahmedAlaaInstabug Oct 21, 2024
3649514
refactor: add modular plugin to mono-repo
ahmedAlaaInstabug Oct 21, 2024
c4fb69e
refactor: add modular plugin to mono-repo
ahmedAlaaInstabug Oct 21, 2024
12e4fd1
refactor: add modular plugin to mono-repo
ahmedAlaaInstabug Oct 21, 2024
d0f334f
fix PR comments
ahmedAlaaInstabug Oct 27, 2024
ae524a2
fix: android test cases
ahmedAlaaInstabug Oct 27, 2024
ddead7f
fix: android test cases
ahmedAlaaInstabug Oct 27, 2024
7414132
fix PR comments
ahmedAlaaInstabug Oct 27, 2024
1f3d95e
fix git ignore
ahmedAlaaInstabug Oct 31, 2024
b1a88ae
rename: instabug_flutter
ahmedAlaaInstabug Oct 31, 2024
d6ad128
rename: instabug_flutter
ahmedAlaaInstabug Oct 31, 2024
476c29e
doc:comment why not use const constructor
ahmedAlaaInstabug Oct 31, 2024
15e001b
fix
ahmedAlaaInstabug Oct 31, 2024
5b94581
feat(ios): handle private views (#524)
ahmedAlaaInstabug Oct 31, 2024
ae70469
Merge branch 'refs/heads/refactor/monorepo' into refactor/monorepo-ad…
ahmedAlaaInstabug Oct 31, 2024
606e4c1
refactor: rename http client package
ahmedAlaaInstabug Oct 31, 2024
a249c77
Merge branch 'refs/heads/refactor/monorepo' into refactor/monorepo-di…
ahmedAlaaInstabug Oct 31, 2024
0063010
refactor: rename dio interceptor package
ahmedAlaaInstabug Oct 31, 2024
6dcdffb
feat: add private view example page (#525)
ahmedAlaaInstabug Oct 31, 2024
a142b7b
init
ahmedAlaaInstabug Nov 2, 2024
92201a1
Merge branch 'refs/heads/refactor/monorepo' into refactor/monorepo-pr…
ahmedAlaaInstabug Nov 2, 2024
422e21f
init
ahmedAlaaInstabug Nov 2, 2024
53abf96
init
ahmedAlaaInstabug Nov 2, 2024
c8b944d
init
ahmedAlaaInstabug Nov 2, 2024
96e128a
init
ahmedAlaaInstabug Nov 2, 2024
38971ab
init
ahmedAlaaInstabug Nov 3, 2024
ad192ba
fix PR comment
ahmedAlaaInstabug Nov 3, 2024
c76508f
fix PR comment
ahmedAlaaInstabug Nov 3, 2024
2d716fa
fix PR comment
ahmedAlaaInstabug Nov 3, 2024
837e133
add hybrid app
ahmedAlaaInstabug Nov 10, 2024
d157d4e
add hybrid app
ahmedAlaaInstabug Nov 10, 2024
e9d124a
add hybrid app
ahmedAlaaInstabug Nov 10, 2024
a6789c2
add more example in private view oage
ahmedAlaaInstabug Nov 12, 2024
0370666
add more example in private view oage
ahmedAlaaInstabug Nov 12, 2024
5f0af4c
add more example in private view oage
ahmedAlaaInstabug Nov 12, 2024
4dcf75f
chore: add build files
ahmedAlaaInstabug Nov 13, 2024
e4b6c3a
chore: add animation
ahmedAlaaInstabug Nov 14, 2024
89d0de1
fix: private view time
ahmedAlaaInstabug Nov 21, 2024
7763743
fix: private view time
ahmedAlaaInstabug Nov 22, 2024
ea35739
feat: add w3c header
ahmedAlaaInstabug Nov 22, 2024
4bbafb0
Refactor: monorepo v14.0.0 changes (#537)
ahmedAlaaInstabug Dec 2, 2024
20356c0
Merge remote-tracking branch 'refs/remotes/origin/refactor/monorepo' …
ahmedAlaaInstabug Dec 2, 2024
9d60292
feat : add w3c feature
ahmedAlaaInstabug Dec 2, 2024
6d6b022
Merge remote-tracking branch 'refs/remotes/origin/refactor/monorepo' …
ahmedAlaaInstabug Dec 2, 2024
9f704b5
feat : add w3c feature
ahmedAlaaInstabug Dec 2, 2024
eb41d25
Merge remote-tracking branch 'refs/remotes/origin/refactor/monorepo' …
ahmedAlaaInstabug Dec 2, 2024
290e187
chore: update to latest version
ahmedAlaaInstabug Dec 2, 2024
0f1c65a
chore: update to latest version
ahmedAlaaInstabug Dec 2, 2024
dc50a5c
Merge remote-tracking branch 'refs/remotes/origin/refactor/monorepo' …
ahmedAlaaInstabug Dec 2, 2024
838a434
chore: update to latest version
ahmedAlaaInstabug Dec 2, 2024
86ba310
chore: update to latest version
ahmedAlaaInstabug Dec 2, 2024
48b1132
chore: update to latest version
ahmedAlaaInstabug Dec 12, 2024
c50bc61
Merge remote-tracking branch 'refs/remotes/origin/refactor/monorepo-p…
ahmedAlaaInstabug Dec 12, 2024
cdb8017
chore: update to latest version
ahmedAlaaInstabug Dec 12, 2024
2215874
chore: update to latest version
ahmedAlaaInstabug Dec 12, 2024
be76a07
chore: update to latest version
ahmedAlaaInstabug Dec 15, 2024
63a2bc1
Merge pull request #520 from Instabug/refactor/monorepo-add-http-package
ahmedAlaaInstabug Jan 8, 2025
05b2ea4
Merge branch 'refs/heads/refactor/monorepo' into refactor/monorepo-di…
ahmedAlaaInstabug Jan 8, 2025
b357fae
fix same example name
ahmedAlaaInstabug Jan 8, 2025
64f42aa
Merge pull request #521 from Instabug/refactor/monorepo-dio-package
ahmedAlaaInstabug Jan 8, 2025
3201240
Merge branch 'refs/heads/refactor/monorepo' into refactor/monorepo-mo…
ahmedAlaaInstabug Jan 8, 2025
daae1ac
Merge pull request #522 from Instabug/refactor/monorepo-modular-package
ahmedAlaaInstabug Jan 8, 2025
4ac9541
Merge branch 'refs/heads/refactor/monorepo' into refactor/monorepo-pr…
ahmedAlaaInstabug Jan 8, 2025
05fac1f
monorepo
ahmedAlaaInstabug Jan 8, 2025
49ea245
Merge pull request #527 from Instabug/refactor/monorepo-private-view-…
ahmedAlaaInstabug Jan 8, 2025
85d1408
monorepo
ahmedAlaaInstabug Jan 9, 2025
dda1f56
monorepo
ahmedAlaaInstabug Jan 9, 2025
8f785f4
monorepo
ahmedAlaaInstabug Jan 9, 2025
b9984ba
monorepo
ahmedAlaaInstabug Jan 9, 2025
fb97ea4
Merge pull request #545 from Instabug/refactor/monorepo-14.1.0-changes
ahmedAlaaInstabug Jan 13, 2025
ba998f6
fix: android canvas crash
ahmedAlaaInstabug Feb 19, 2025
9b95071
chore: rename enable private views
ahmedAlaaInstabug Feb 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
191 changes: 130 additions & 61 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,36 @@ version: 2.1

orbs:
android: circleci/[email protected]
flutter: circleci/[email protected].2
flutter: circleci/[email protected].4
node: circleci/[email protected]
advanced-checkout: vsco/[email protected]

executors:
flutter-executor:
docker:
- image: cimg/base:stable


commands:
setup_flutter:
parameters:
version:
type: string
default: 3.24.3
use_melos:
type: boolean
default: true
working_dir:
type: string
default: "~/project"
steps:
- flutter/install_sdk_and_pub:
version: 3.10.5
- run:
name: Generate Pigeons
command: sh ./scripts/pigeon.sh
version: <<parameters.version>>
app-dir: <<parameters.working_dir>>
- install_flutter_and_dart_packages:
generate_pigeons: true
use_melos: <<parameters.use_melos>>
working_dir: <<parameters.working_dir>>
setup_ios:
steps:
# Flutter doesn't support Apple Silicon yet, so we need to install Rosetta use Flutter on M1 machines.
Expand All @@ -26,7 +44,7 @@ commands:
command: sudo gem install cocoapods
- run:
name: Install Pods
working_directory: example/ios
working_directory: packages/Instabug-Flutter/example/ios
command: pod install --repo-update
setup_captain:
parameters:
Expand Down Expand Up @@ -77,32 +95,71 @@ commands:
name: Configure Captain Platform
command: echo 'export CAPTAIN_PLATFORM=<<parameters.platform>>' >> $BASH_ENV
# This runs `flutter pub get` and `dart pub get` if we pass parameter `generate_pigeons` to the job it also runs the following:
# - `sh ./scripts/pigeon.sh`
# - `dart run build_runner build --delete-conflicting-outputs`
# - `melos pigeon`
# - `melos generate`
install_flutter_and_dart_packages:
parameters:
generate_pigeons:
type: boolean
use_melos:
type: boolean
default: true
working_dir:
type: string
steps:
- run:
name: Install Flutter Packages
command: flutter pub get
- run:
name: Install Dart Packages
command: dart pub get
description: Install Dart Packages (for dart explicit packages)
- when:
condition:
equal:
- <<parameters.generate_pigeons>>
- <<parameters.use_melos>>
- true
steps:
- run:
name: Generate Pigeons
command: sh ./scripts/pigeon.sh
name: Install melos
command: dart pub global activate melos && echo 'export PATH="$PATH:$HOME/.pub-cache/bin"' >> $BASH_ENV
- run:
name: Install Flutter Packages
command: melos bootstrap
- run:
name: Build Pigeons
command: dart run build_runner build --delete-conflicting-outputs
name: Install Dart Packages
command: melos dart_bootstrap
description: Install Dart Packages (for dart explicit packages)
- when:
condition:
equal:
- <<parameters.generate_pigeons>>
- true
steps:
- run:
name: Generate Pigeons
command: melos pigeon
- run:
name: Build Pigeons
command: melos generate
- when:
condition:
equal:
- <<parameters.use_melos>>
- false
steps:
- run:
name: Install Flutter Packages
command: flutter pub get
- run:
name: Install Dart Packages
command: dart pub get
description: Install Dart Packages (for dart explicit packages)
- when:
condition:
equal:
- <<parameters.generate_pigeons>>
- true
steps:
- run:
name: Generate Pigeons
command: sh scripts/pigeon.sh
- run:
name: Build Pigeons
command: dart run build_runner build --delete-conflicting-outputs

jobs:
danger:
Expand All @@ -114,7 +171,7 @@ jobs:
pkg-manager: yarn
override-ci-command: yarn install --frozen-lockfile --network-concurrency 1
- attach_workspace:
at: coverage
at: ~/project
- run:
name: Run Danger
command: yarn danger ci
Expand All @@ -123,20 +180,38 @@ jobs:
parameters:
version:
type: string
docker:
- image: cirrusci/flutter:<<parameters.version>>
default: "3.24.3"
executor: flutter-executor
steps:
- advanced-checkout/shallow-checkout
- install_flutter_and_dart_packages:
generate_pigeons: true
- run: flutter test --coverage
- run:
working_directory: coverage
command: lcov --remove lcov.info '*.g.dart' '*.mocks.dart' -o lcov.info
- run: sudo apt-get update&& sudo apt-get -y install lcov
- setup_flutter:
version: <<parameters.version>>
use_melos: true
- run: melos test-coverage
- persist_to_workspace:
root: coverage
root: ~/project
paths:
- lcov.info
- coverage


test_flutter_without_melos:
parameters:
version:
type: string
default: "2.10.0"
app-dir:
type: string
executor: flutter-executor
working_directory: <<parameters.app-dir>>
steps:
- advanced-checkout/shallow-checkout:
path: ~/project
- setup_flutter:
version: <<parameters.version>>
use_melos: false
working_dir: <<parameters.app-dir>>
- run: flutter test

test_android:
executor:
Expand All @@ -147,7 +222,7 @@ jobs:
- advanced-checkout/shallow-checkout
- setup_flutter
- android/run-tests:
working-directory: example/android
working-directory: packages/Instabug-Flutter/example/android
test-command: ./gradlew test

e2e_android_captain:
Expand All @@ -164,7 +239,7 @@ jobs:
run-tests-working-directory: e2e
additional-avd-args: --device 3
system-image: system-images;android-33;default;x86_64
post-emulator-launch-assemble-command: cd example && flutter build apk --debug
post-emulator-launch-assemble-command: cd packages/Instabug-Flutter/example && flutter build apk --debug
test-command: dotnet test

test_ios:
Expand All @@ -178,7 +253,7 @@ jobs:
- setup_ios
- run:
name: Build and run tests
working_directory: ~/project/example/ios
working_directory: ~/project/packages/Instabug-Flutter/example/ios
command: |
xcodebuild -allowProvisioningUpdates \
-workspace Runner.xcworkspace \
Expand All @@ -199,7 +274,7 @@ jobs:
- setup_ios
- run:
name: Build Example App
working_directory: example
working_directory: packages/Instabug-Flutter/example
command: flutter build ios --simulator
- run:
name: Run E2E Tests
Expand All @@ -208,44 +283,38 @@ jobs:
command: dotnet test

format_flutter:
docker:
- image: cirrusci/flutter
executor: flutter-executor
steps:
- advanced-checkout/shallow-checkout
- install_flutter_and_dart_packages:
generate_pigeons: false
- setup_flutter
- run:
name: Check Format
command: dart format . --set-exit-if-changed
command: melos format

lint_flutter:
docker:
- image: cirrusci/flutter
executor: flutter-executor
steps:
- advanced-checkout/shallow-checkout
- install_flutter_and_dart_packages:
generate_pigeons: true
- setup_flutter
- run:
name: Perform Static Analysis
command: flutter analyze
command: melos analyze

verify_pub:
docker:
- image: cirrusci/flutter
executor: flutter-executor
steps:
- advanced-checkout/shallow-checkout
- install_flutter_and_dart_packages:
generate_pigeons: true
- setup_flutter
- run:
name: Check Package Score
command: dart run pana --no-warning --exit-code-threshold 0
- run: flutter pub publish --dry-run
command: melos score
- run: melos dryPublish

release:
release_instabug_flutter:
macos:
xcode: 15.2.0
resource_class: macos.m1.medium.gen1
working_directory: "~"
working_directory: "~/project"
steps:
- advanced-checkout/shallow-checkout:
path: ~/project
Expand All @@ -254,7 +323,7 @@ jobs:
name: Install Rosetta
command: softwareupdate --install-rosetta --agree-to-license
- flutter/install_sdk_and_pub:
version: 3.3.6
version: 3.10.5
app-dir: project
- run:
name: Install pub packages
Expand All @@ -263,7 +332,7 @@ jobs:
- run:
name: Generate Pigeons
working_directory: project
command: sh ./scripts/pigeon.sh
command: melos pigeon
- run:
name: Clone Escape
command: git clone [email protected]:Instabug/Escape.git
Expand All @@ -288,10 +357,10 @@ workflows:
- test_flutter-stable
- test_flutter:
name: test_flutter-stable
version: stable
- test_flutter:
- test_flutter_without_melos:
name: test_flutter-2.10.5
version: 2.10.5
app-dir: "~/project/packages/Instabug-Flutter/"
- e2e_android_captain
- test_ios
- e2e_ios_captain
Expand All @@ -302,7 +371,7 @@ workflows:
- verify_pub:
requires:
- lint_flutter
- hold_release:
- hold_release_instabug_flutter:
type: approval
requires:
- danger
Expand All @@ -319,9 +388,9 @@ workflows:
filters:
branches:
only: master
- release:
- release_instabug_flutter:
requires:
- hold_release
- hold_release_instabug_flutter
filters:
branches:
only: master
only: master
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Generated files
*.mocks.dart
*.g.dart
android/**/generated/
ios/**/Generated/
packages/**/android/**/generated/
packages/**ios/**/Generated/

# Miscellaneous
*.class
Expand Down Expand Up @@ -84,3 +84,4 @@ android/gradlew.bat
!**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
/packages/Instabug-Flutter/lib/src/generated/
Loading