Skip to content

Commit

Permalink
Merge pull request #16 from dshukertjr/feat/analytics
Browse files Browse the repository at this point in the history
Added Firebase Analytics
  • Loading branch information
dshukertjr authored Jun 6, 2021
2 parents 4560dcf + 9283850 commit f642003
Show file tree
Hide file tree
Showing 35 changed files with 450 additions and 163 deletions.
23 changes: 9 additions & 14 deletions .github/workflows/cd_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
pull_request:

jobs:
build:
Expand All @@ -23,19 +24,14 @@ jobs:
# Get flutter dependencies.
- run: flutter pub get

# Check for any formatting issues in the code.
- run: flutter format -l 100 --set-exit-if-changed lib test

# # Check for any formatting issues in the code.
# - run: flutter format --set-exit-if-changed .

# # Statically analyze the Dart code for any errors.
# - run: flutter analyze .

# # Run widget tests for our flutter project.
# - run: flutter test

# Build ios app
# - run: flutter build appbundle --flavor production --target lib/main_production.dart --dart-define=SUPABASE_URL=${{ secrets.SUPABASE_URL }} --dart-define=SUPABASE_ANNON_KEY=${{ secrets.SUPABASE_ANNON_KEY }}
# Statically analyze the Dart code for any errors.
- run: flutter analyze .

# Run widget tests for our flutter project.
- run: flutter test

- name: Download Android keystore
id: android_keystore
Expand All @@ -52,8 +48,7 @@ jobs:
echo "keyAlias=${{ secrets.ANDROID_KEY_ALIAS }}" >> android/key.properties
- name: Build Android App Bundle
run: flutter build appbundle --flavor production --target lib/main_production.dart --dart-define=SUPABASE_URL=${{ secrets.SUPABASE_URL }} --dart-define=SUPABASE_ANNON_KEY=${{ secrets.SUPABASE_ANNON_KEY }}

run: flutter build appbundle --flavor production --dart-define=SUPABASE_URL=${{ secrets.SUPABASE_URL }} --dart-define=SUPABASE_ANNON_KEY=${{ secrets.SUPABASE_ANNON_KEY }}

- name: Setup Ruby
uses: actions/setup-ruby@v1
Expand All @@ -79,4 +74,4 @@ jobs:
run: |
bundle exec fastlane supply \
--aab build/app/outputs/bundle/productionRelease/app-production-release.aab \
--track internal
--track internal
18 changes: 9 additions & 9 deletions .github/workflows/cd_ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
pull_request:

jobs:
build:
Expand All @@ -17,18 +18,17 @@ jobs:
# Get flutter dependencies.
- run: flutter pub get

# # Check for any formatting issues in the code.
# - run: flutter format --set-exit-if-changed .
# Check for any formatting issues in the code.
- run: flutter format -l 100 --set-exit-if-changed lib test

# # Statically analyze the Dart code for any errors.
# - run: flutter analyze .
# Statically analyze the Dart code for any errors.
- run: flutter analyze .

# # Run widget tests for our flutter project.
# - run: flutter test
# Run widget tests for our flutter project.
- run: flutter test

# Build ios app
- run: flutter build ios --release --no-codesign --flavor production --target lib/main_production.dart --dart-define=SUPABASE_URL=${{ secrets.SUPABASE_URL }} --dart-define=SUPABASE_ANNON_KEY=${{ secrets.SUPABASE_ANNON_KEY }}

- run: flutter build ios --release --no-codesign --flavor production --dart-define=SUPABASE_URL=${{ secrets.SUPABASE_URL }} --dart-define=SUPABASE_ANNON_KEY=${{ secrets.SUPABASE_ANNON_KEY }}

- name: Release
env:
Expand All @@ -39,4 +39,4 @@ jobs:
APP_STORE_CONNECT_PRIVATE_KEY: ${{ secrets.APP_STORE_CONNECT_PRIVATE_KEY }}
run: |
cd ios
fastlane release
fastlane release
10 changes: 5 additions & 5 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
run: flutter analyze lib test

- name: Run tests
run: flutter test --no-pub --coverage --test-randomize-ordering-seed random
run: flutter test --no-pub --coverage

- name: Check Code Coverage
uses: VeryGoodOpenSource/[email protected]
with:
min_coverage: 95
# - name: Check Code Coverage
# uses: VeryGoodOpenSource/[email protected]
# with:
# min_coverage: 95
18 changes: 1 addition & 17 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,13 @@
"name": "Launch development",
"request": "launch",
"type": "dart",
"program": "lib/main_development.dart",
"program": "lib/main.dart",
"args": [
"--flavor",
"development",
"--target",
"lib/main_development.dart",
"--dart-define=SUPABASE_URL=https://uolvtdzkvkolsynuhmzh.supabase.co",
"--dart-define=SUPABASE_ANNON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlhdCI6MTYxNjUzOTE5MSwiZXhwIjoxOTMyMTE1MTkxfQ.wBv3mCxuQzf-xdn9c6m262t_j2sTiMOLPRRB6U77G7U"
]
},
{
"name": "Launch staging",
"request": "launch",
"type": "dart",
"program": "lib/main_staging.dart",
"args": ["--flavor", "staging", "--target", "lib/main_staging.dart"]
},
{
"name": "Launch production",
"request": "launch",
"type": "dart",
"program": "lib/main_production.dart",
"args": ["--flavor", "production", "--target", "lib/main_production.dart"]
}
]
}
1 change: 1 addition & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ if (keystorePropertiesFile.exists()) {
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply plugin: 'com.google.gms.google-services'

android {
compileSdkVersion 30
Expand Down
46 changes: 46 additions & 0 deletions android/app/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"project_info": {
"project_number": "669895901022",
"project_id": "spot-videos",
"storage_bucket": "spot-videos.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:669895901022:android:e776461d00834e86c059cf",
"android_client_info": {
"package_name": "app.spotvideo"
}
},
"oauth_client": [
{
"client_id": "669895901022-gekl8a8ik43uelnm65ik1gicqanu8anl.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyBGEorLZKpQcoT674TjNMG_GEES_nbLXdE"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "669895901022-gekl8a8ik43uelnm65ik1gicqanu8anl.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "669895901022-b3pqggv2v8bkljpoojsjfgf369ip7709.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "app.spotvideo"
}
}
]
}
}
}
],
"configuration_version": "1"
}
46 changes: 46 additions & 0 deletions android/app/src/development/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"project_info": {
"project_number": "405360906678",
"project_id": "spot-videos-dev",
"storage_bucket": "spot-videos-dev.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:405360906678:android:dba509310c0769f4b47117",
"android_client_info": {
"package_name": "com.example.spot.dev"
}
},
"oauth_client": [
{
"client_id": "405360906678-7c9f4q124fsfpkcbqmrebccail96cs7i.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyAZw_5_i8MeBiiuvUyWTxjdmnq2i3WpNUY"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "405360906678-7c9f4q124fsfpkcbqmrebccail96cs7i.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "405360906678-avbp7njivl97qe90l7ohn3u5l52u0d66.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.example.spot.dev"
}
}
]
}
}
}
],
"configuration_version": "1"
}
46 changes: 46 additions & 0 deletions android/app/src/production/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"project_info": {
"project_number": "669895901022",
"project_id": "spot-videos",
"storage_bucket": "spot-videos.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:669895901022:android:e776461d00834e86c059cf",
"android_client_info": {
"package_name": "app.spotvideo"
}
},
"oauth_client": [
{
"client_id": "669895901022-gekl8a8ik43uelnm65ik1gicqanu8anl.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyBGEorLZKpQcoT674TjNMG_GEES_nbLXdE"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "669895901022-gekl8a8ik43uelnm65ik1gicqanu8anl.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "669895901022-b3pqggv2v8bkljpoojsjfgf369ip7709.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "app.spotvideo"
}
}
]
}
}
}
],
"configuration_version": "1"
}
1 change: 1 addition & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.8'
}
}

Expand Down
5 changes: 1 addition & 4 deletions ios/Flutter/Debug.xcconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug-development.xcconfig"
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug-staging.xcconfig"
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug-production.xcconfig"
#include "Generated.xcconfig"
8 changes: 1 addition & 7 deletions ios/Flutter/Release.xcconfig
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release-development.xcconfig"
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release-staging.xcconfig"
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release-production.xcconfig"
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.profile-development.xcconfig"
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.profile-staging.xcconfig"
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.profile-production.xcconfig"
#include "Generated.xcconfig"
Loading

0 comments on commit f642003

Please sign in to comment.