Skip to content

Commit 322ea6e

Browse files
refactor: make mono-repo
1 parent 7ae921c commit 322ea6e

File tree

284 files changed

+9112
-1150
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

284 files changed

+9112
-1150
lines changed

.circleci/config.yml

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,15 @@ commands:
1111
steps:
1212
- flutter/install_sdk_and_pub:
1313
version: 3.10.5
14+
- run:
15+
name: Install melos
16+
command: dart pub global activate melos
17+
- run:
18+
name: bootstrap
19+
command: melos bootstrap
1420
- run:
1521
name: Generate Pigeons
16-
command: sh ./scripts/pigeon.sh
22+
command: melos pigeon
1723
setup_ios:
1824
steps:
1925
# Flutter doesn't support Apple Silicon yet, so we need to install Rosetta use Flutter on M1 machines.
@@ -26,7 +32,7 @@ commands:
2632
command: sudo gem install cocoapods
2733
- run:
2834
name: Install Pods
29-
working_directory: example/ios
35+
working_directory: apps/example/ios
3036
command: pod install --repo-update
3137
setup_captain:
3238
parameters:
@@ -77,8 +83,8 @@ commands:
7783
name: Configure Captain Platform
7884
command: echo 'export CAPTAIN_PLATFORM=<<parameters.platform>>' >> $BASH_ENV
7985
# This runs `flutter pub get` and `dart pub get` if we pass parameter `generate_pigeons` to the job it also runs the following:
80-
# - `sh ./scripts/pigeon.sh`
81-
# - `dart run build_runner build --delete-conflicting-outputs`
86+
# - `melos pigeon`
87+
# - `melos generate`
8288
install_flutter_and_dart_packages:
8389
parameters:
8490
generate_pigeons:
@@ -89,7 +95,7 @@ commands:
8995
command: flutter pub get
9096
- run:
9197
name: Install Dart Packages
92-
command: dart pub get
98+
command: melos dart_bootstrap
9399
description: Install Dart Packages (for dart explicit packages)
94100
- when:
95101
condition:
@@ -99,10 +105,10 @@ commands:
99105
steps:
100106
- run:
101107
name: Generate Pigeons
102-
command: sh ./scripts/pigeon.sh
108+
command: melos pigeon
103109
- run:
104110
name: Build Pigeons
105-
command: dart run build_runner build --delete-conflicting-outputs
111+
command: melos generate
106112

107113
jobs:
108114
danger:
@@ -147,7 +153,7 @@ jobs:
147153
- advanced-checkout/shallow-checkout
148154
- setup_flutter
149155
- android/run-tests:
150-
working-directory: example/android
156+
working-directory: apps/example/android
151157
test-command: ./gradlew test
152158

153159
e2e_android_captain:
@@ -164,7 +170,7 @@ jobs:
164170
run-tests-working-directory: e2e
165171
additional-avd-args: --device 3
166172
system-image: system-images;android-33;default;x86_64
167-
post-emulator-launch-assemble-command: cd example && flutter build apk --debug
173+
post-emulator-launch-assemble-command: cd apps/example && flutter build apk --debug
168174
test-command: dotnet test
169175

170176
test_ios:
@@ -178,7 +184,7 @@ jobs:
178184
- setup_ios
179185
- run:
180186
name: Build and run tests
181-
working_directory: ~/project/example/ios
187+
working_directory: ~/project/apps/example/ios
182188
command: |
183189
xcodebuild -allowProvisioningUpdates \
184190
-workspace Runner.xcworkspace \
@@ -199,7 +205,7 @@ jobs:
199205
- setup_ios
200206
- run:
201207
name: Build Example App
202-
working_directory: example
208+
working_directory: apps/example
203209
command: flutter build ios --simulator
204210
- run:
205211
name: Run E2E Tests
@@ -216,7 +222,7 @@ jobs:
216222
generate_pigeons: false
217223
- run:
218224
name: Check Format
219-
command: dart format . --set-exit-if-changed
225+
command: melos format
220226

221227
lint_flutter:
222228
docker:
@@ -227,7 +233,7 @@ jobs:
227233
generate_pigeons: true
228234
- run:
229235
name: Perform Static Analysis
230-
command: flutter analyze
236+
command: melos analyze
231237

232238
verify_pub:
233239
docker:
@@ -238,10 +244,10 @@ jobs:
238244
generate_pigeons: true
239245
- run:
240246
name: Check Package Score
241-
command: dart run pana --no-warning --exit-code-threshold 0
242-
- run: flutter pub publish --dry-run
247+
command: melos score
248+
- run: melos dryPublish
243249

244-
release:
250+
release_instabug_flutter:
245251
macos:
246252
xcode: 15.2.0
247253
resource_class: macos.m1.medium.gen1
@@ -263,7 +269,7 @@ jobs:
263269
- run:
264270
name: Generate Pigeons
265271
working_directory: project
266-
command: sh ./scripts/pigeon.sh
272+
command: melos pigeon
267273
- run:
268274
name: Clone Escape
269275
command: git clone [email protected]:Instabug/Escape.git

.metadata

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: 5391447fae6209bb21a89e6a5a6583cac1af9b4b
8-
channel: stable
7+
revision: "2663184aa79047d0a33a14a3b607954f8fdd8730"
8+
channel: "stable"
99

10-
project_type: plugin
10+
project_type: package

README.md

Lines changed: 25 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,116 +1,39 @@
1-
# Instabug for Flutter
1+
<!--
2+
This README describes the package. If you publish this package to pub.dev,
3+
this README's contents appear on the landing page for your package.
24
3-
[![pub package](https://img.shields.io/pub/v/instabug_flutter.svg)](https://pub.dev/packages/instabug_flutter)
5+
For information about how to write a good package README, see the guide for
6+
[writing package pages](https://dart.dev/tools/pub/writing-package-pages).
47
5-
A Flutter plugin for [Instabug](https://instabug.com/).
8+
For general information about developing packages, see the Dart guide for
9+
[creating packages](https://dart.dev/guides/libraries/create-packages)
10+
and the Flutter guide for
11+
[developing packages and plugins](https://flutter.dev/to/develop-packages).
12+
-->
613

7-
## Available Features
14+
TODO: Put a short description of the package here that helps potential users
15+
know whether this package might be useful for them.
816

9-
| Feature | Status |
10-
|:---------------------------------------------------------:|:-------:|
11-
| [Bug Reporting](https://docs.instabug.com/docs/flutter-bug-reporting) ||
12-
| [Crash Reporting](https://docs.instabug.com/docs/flutter-crash-reporting) ||
13-
| [App Performance Monitoring](https://docs.instabug.com/docs/flutter-apm) ||
14-
| [In-App Replies](https://docs.instabug.com/docs/flutter-in-app-replies) ||
15-
| [In-App Surveys](https://docs.instabug.com/docs/flutter-in-app-surveys) ||
16-
| [Feature Requests](https://docs.instabug.com/docs/flutter-in-app-feature-requests) ||
17+
## Features
1718

18-
* ✅ Stable
19-
* ⚙️ Under active development
19+
TODO: List what your package can do. Maybe include images, gifs, or videos.
2020

21-
## Integration
21+
## Getting started
2222

23-
### Installation
23+
TODO: List prerequisites and provide or point to information on how to
24+
start using the package.
2425

25-
1. Add Instabug to your `pubspec.yaml` file.
26+
## Usage
2627

27-
```yaml
28-
dependencies:
29-
instabug_flutter:
30-
```
31-
32-
2. Install the package by running the following command.
33-
34-
```bash
35-
flutter packages get
36-
```
37-
38-
### Initializing Instabug
39-
40-
Initialize the SDK in your `main` function. This starts the SDK with the default behavior and sets it to be shown when the device is shaken.
28+
TODO: Include short and useful examples for package users. Add longer examples
29+
to `/example` folder.
4130

4231
```dart
43-
import 'package:instabug_flutter/instabug_flutter.dart';
44-
45-
void main() {
46-
WidgetsFlutterBinding.ensureInitialized();
47-
48-
Instabug.init(
49-
token: 'APP_TOKEN',
50-
invocationEvents: [InvocationEvent.shake],
51-
);
52-
53-
runApp(MyApp());
54-
}
32+
const like = 'sample';
5533
```
5634

57-
> :warning: If you're updating the SDK from versions prior to v11, please check our [migration guide](https://docs.instabug.com/docs/flutter-migration-guide).
58-
59-
## Crash reporting
60-
61-
Instabug automatically captures every crash of your app and sends relevant details to the crashes page of your dashboard.
62-
63-
⚠️ **Crashes will only be reported in release mode and not in debug mode.**
64-
65-
```dart
66-
void main() {
67-
runZonedGuarded(
68-
() {
69-
WidgetsFlutterBinding.ensureInitialized();
70-
71-
Instabug.init(
72-
token: 'APP_TOKEN',
73-
invocationEvents: [InvocationEvent.shake],
74-
);
75-
76-
FlutterError.onError = (FlutterErrorDetails details) {
77-
Zone.current.handleUncaughtError(details.exception, details.stack!);
78-
};
79-
80-
runApp(MyApp());
81-
},
82-
CrashReporting.reportCrash,
83-
);
84-
}
85-
```
86-
87-
## Repro Steps
88-
Repro Steps list all of the actions an app user took before reporting a bug or crash, grouped by the screens they visited in your app.
89-
90-
To enable this feature, you need to add `InstabugNavigatorObserver` to the `navigatorObservers` :
91-
```
92-
runApp(MaterialApp(
93-
navigatorObservers: [InstabugNavigatorObserver()],
94-
));
95-
```
96-
97-
## Network Logging
98-
You can choose to attach all your network requests to the reports being sent to the dashboard. To enable the feature when using the `dart:io` package `HttpClient`, please refer to the [Instabug Dart IO Http Client](https://github.com/Instabug/instabug-dart-io-http-client) repository.
99-
100-
We also support the packages `http` and `dio`. For details on how to enable network logging for these external packages, refer to the [Instabug Dart Http Adapter](https://github.com/Instabug/Instabug-Dart-http-Adapter) and the [Instabug Dio Interceptor](https://github.com/Instabug/Instabug-Dio-Interceptor) repositories.
101-
102-
## Microphone and Photo Library Usage Description (iOS Only)
103-
104-
Instabug needs access to the microphone and photo library to be able to let users add audio and video attachments. Starting from iOS 10, apps that don’t provide a usage description for those 2 permissions would be rejected when submitted to the App Store.
105-
106-
For your app not to be rejected, you’ll need to add the following 2 keys to your app’s info.plist file with text explaining to the user why those permissions are needed:
107-
108-
* `NSMicrophoneUsageDescription`
109-
* `NSPhotoLibraryUsageDescription`
110-
111-
If your app doesn’t already access the microphone or photo library, we recommend using a usage description like:
112-
113-
* "`<app name>` needs access to the microphone to be able to attach voice notes."
114-
* "`<app name>` needs access to your photo library for you to be able to attach images."
35+
## Additional information
11536

116-
**The permission alert for accessing the microphone/photo library will NOT appear unless users attempt to attach a voice note/photo while using Instabug.**
37+
TODO: Tell users more about the package: where to find more information, how to
38+
contribute to the package, how to file issues, what response they can expect
39+
from the package authors, and more.

analysis_options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ include: package:lint/analysis_options_package.yaml
22

33
analyzer:
44
exclude:
5-
- "example/**"
5+
- "apps/example/**"
66
- "**/*.g.dart"
77

88
linter:
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)