mapbox / mapbox/mapbox-navigation-android

Refactor how we manage firebase gradle plugins for the test-app

Open
#4,076 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Kotlin
Stars
651
Forks
321
PR merge metrics
No merged PRs in 30d

Description

Following up from https://github.com/mapbox/mapbox-navigation-android/pull/4075
Other approaches considered https://github.com/mapbox/mapbox-navigation-android/issues/4071

### Problem

Right now we have an empty google-services.json to allow customers to run the app without access to Firebase. But we don't want to require an empty

This ticket is to consider approaches and find a long term solution. Iterations attempted may need to be expanded on.

This ticket may also require a request from Firebase, to give a clean recommendation.

### Requirements

- Customers outside of Mapbox should be able to clone the repo and run the test-app
- Firebase robotic runs should be able to run the test app
- Firebase robotic runs should include crashlytics

### Approaches

Pass in a gradle parameter to disable plugins ./gradlew ... -PuseFirebasePerfAndCrashlytics=true

if (useFirebasePerfAndCrashlytics) {
apply(plugin = "com.google.firebase.firebase-perf")
apply(plugin = "com.google.firebase.crashlytics")
println("Firebase performance and crashlytics plugins applied")
}

This doesn't work because the plugin is required even if the build type is not used
``` groovy
release {
minifyEnabled true
signingConfig signingConfigs.release
manifestPlaceholders = [enableCrashReporting: "true"]
firebaseCrashlytics { << == required even when the variant is debug build
mappingFileUploadEnabled = true
nativeSymbolUploadEnabled = true
strippedNativeLibsDir = 'build/intermediates/stripped_native_libs/debug/release/lib/'
unstrippedNativeLibsDir = com.mapbox.gradle.NativeDownloadTask.UNSTRIPPED_NATIVE_LIBS_PATH
}
}
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading pull request 4075 and issue 4071, then inspect the test-app Gradle configuration and its google-services.json usage. Compare the proposed Firebase plugin approaches against the three requirements: external customers can clone and run the app, Firebase robotic runs can run it, and those runs include Crashlytics.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, firebase, kotlin
Domain
build-system, mobile-dev
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.