Skip to content

Commit

Permalink
Merge pull request #217 from Eldar2021/ai/adding-crashlytics
Browse files Browse the repository at this point in the history
Integrated FirebaseCrashlytics
  • Loading branch information
Eldar2021 authored Jul 2, 2024
2 parents aa1a608 + 823dfd8 commit da2740b
Show file tree
Hide file tree
Showing 34 changed files with 392 additions and 66 deletions.
3 changes: 3 additions & 0 deletions .fvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"flutter": "3.19.5"
}
2 changes: 2 additions & 0 deletions .github/workflows/analyze_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
channel: "stable"
- run: flutter doctor

- run: dart pub global activate flutterfire_cli

- name: "Melos Install"
run: dart pub global activate melos

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
channel: "stable"
- run: flutter doctor

- run: dart pub global activate flutterfire_cli

- name: "Melos Install"
run: dart pub global activate melos

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/build_ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
build_ios:
runs-on: macos-12
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
Expand All @@ -18,6 +18,8 @@ jobs:
architecture: x64
- run: flutter doctor

- run: dart pub global activate flutterfire_cli

- name: "Melos Install"
run: dart pub global activate melos

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
cache: gradle
- run: flutter doctor -v

- run: dart pub global activate flutterfire_cli

- name: "Melos Install"
run: dart pub global activate melos

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci_ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
channel: stable
- run: flutter doctor -v

- run: dart pub global activate flutterfire_cli

- name: "Melos Install"
run: dart pub global activate melos

Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@


# Miscellaneous
*.class
*.log
Expand Down Expand Up @@ -65,3 +64,5 @@ app/android/fastlane/metadata/android/en-US/images/phoneScreenshots/
**/build/
# keep the .lock file from the workspace and the app.
packages/**/pubspec.lock
# FVM Version Cache
.fvm/
13 changes: 10 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
{
"dart.lineLength": 120,
"git.ignoreLimitWarning": true,
"explorer.autoReveal": false,
"dart.lineLength": 120,
"git.ignoreLimitWarning": true,
"explorer.autoReveal": false,
"dart.flutterSdkPath": ".fvm/versions/3.19.5",
"search.exclude": {
"**/.fvm": true
},
"files.watcherExclude": {
"**/.fvm": true
}
}
44 changes: 33 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,56 +26,78 @@ My Quran Hatim Aplication.
### Getting Started

## Requirements

- Dart sdk: ">=3.3.0 <4.0.0"
- Flutter: "3.19.5"
- Android: minSdkVersion 19
- iOS: --ios-language swift, Xcode version >= 15.0.0

## Melos

[Melos](https://melos.invertase.dev/) splitting up large code bases into separate independently versioned packages is extremely useful for code sharing. However, making changes across many repositories is messy and difficult to track, and testing across repositories gets complicated really fast.
To solve these (and many other) problems, some projects will organize their code bases into multi-package repositories (sometimes called [monorepos](https://en.wikipedia.org/wiki/Monorepo)).

* Install melos
- Install melos

```shell
dart pub global activate melos
```

Setup

```shell
melos bootstrap
```

## Run App
* If you have an AVD or real device attached, you can do

- If you have an AVD or real device attached, you can do

```shell
melos run-app
```

## Run tests
* run all tests from the command line:

- run all tests from the command line:

```shell
melos test
```

## Integration tests
* run integration tests in `test_driver` directory:

- run integration tests in `test_driver` directory:

```shell
melos integration-test
```

## Fmt
`dartfmt` lacks config file support, which implies that customizations need to be done by users individually. The default
limit of 80 characters line length conflicts with the deeply nested structure of flutter's declarative code for designing

`dartfmt` lacks config file support, which implies that customizations need to be done by users individually. The default
limit of 80 characters line length conflicts with the deeply nested structure of flutter's declarative code for designing
widgets. This causes many unwanted linebreaks that reduce the readability of flutter code. Hence, we increase the line
length of the code to 120.

* Settings > Dart > Line length 120.
* Autoformat on save: Settings > Languages and Frameworks > then tick: `Format code on save`, `Organize imports on save`.
* Format the whole codebase with:
- Settings > Dart > Line length 120.
- Autoformat on save: Settings > Languages and Frameworks > then tick: `Format code on save`, `Organize imports on save`.
- Format the whole codebase with:

```shell
melos format-all
```

## Generate
* Re generate .g files run:

- Re generate .g files run:

```shell
melos run-build-runner-all
```
```

### Installing iOS Dependencies

```sh
./scripts/pod_install.sh
```
1 change: 1 addition & 0 deletions app/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ if (flutterVersionName == null) {
apply plugin: 'com.android.application'
// START: FlutterFire Configuration
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
// END: FlutterFire Configuration
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
Expand Down
4 changes: 2 additions & 2 deletions app/android/app/google-services.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@
"client_type": 3
},
{
"client_id": "417182149715-jknocdcmfmmahvr2fup4slmkltqdq9l4.apps.googleusercontent.com",
"client_id": "417182149715-icusnhceqetnqlinprnn9o8tamct4g7q.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.example"
"bundle_id": "com.alee.hatimapp"
}
}
]
Expand Down
1 change: 1 addition & 0 deletions app/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ buildscript {
dependencies {
// START: FlutterFire Configuration
classpath 'com.google.gms:google-services:4.3.15'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'
// END: FlutterFire Configuration
classpath 'com.android.tools.build:gradle:7.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
Expand Down
2 changes: 1 addition & 1 deletion app/firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"default": {
"projectId": "my-quran-01",
"appId": "1:417182149715:ios:f6d207c487b6110e76eaa6",
"uploadDebugSymbols": false,
"uploadDebugSymbols": true,
"fileOutput": "ios/Runner/GoogleService-Info.plist"
}
},
Expand Down
Loading

0 comments on commit da2740b

Please sign in to comment.