Skip to content
Permalink
Browse files
Add dependency and configure flipper
  • Loading branch information
MichaelEvans committed Mar 11, 2020
1 parent 7057c6f commit 274ea5702cb5f10ea13012ce6d9fc6b6896f471e
@@ -70,6 +70,11 @@ jacoco {
}

dependencies {
debugImplementation deps.facebook.flipper
debugImplementation deps.facebook.soloader

releaseImplementation deps.facebook.noopflipper

implementation deps.app_compat
implementation deps.recyclerview
implementation deps.cardview
@@ -19,18 +19,32 @@ package com.android.example.github
import android.app.Activity
import android.app.Application
import com.android.example.github.di.AppInjector
import com.facebook.flipper.android.AndroidFlipperClient
import com.facebook.flipper.android.utils.FlipperUtils
import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin
import com.facebook.flipper.plugins.inspector.DescriptorMapping
import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin
import com.facebook.soloader.SoLoader
import dagger.android.DispatchingAndroidInjector
import dagger.android.HasActivityInjector
import timber.log.Timber
import javax.inject.Inject


class GithubApp : Application(), HasActivityInjector {
@Inject
lateinit var dispatchingAndroidInjector: DispatchingAndroidInjector<Activity>

override fun onCreate() {
super.onCreate()
SoLoader.init(this, false);

if (BuildConfig.DEBUG && FlipperUtils.shouldEnableFlipper(this)) {
val client = AndroidFlipperClient.getInstance(this);
client.addPlugin(InspectorFlipperPlugin(this, DescriptorMapping.withDefaults()));
client.addPlugin(DatabasesFlipperPlugin(this));
client.start();
}

if (BuildConfig.DEBUG) {
Timber.plant(Timber.DebugTree())
}
@@ -39,6 +39,7 @@ versions.coroutines = "1.3.3"
versions.dagger = "2.16"
versions.dexmaker = "2.2.0"
versions.espresso = "3.2.0"
versions.flipper = "0.33.1"
versions.fragment = "1.2.1"
versions.glide = "4.8.0"
versions.hamcrest = "1.3"
@@ -59,14 +60,15 @@ versions.robolectric = "4.2"
versions.room = "2.2.3"
versions.rx_android = "2.0.1"
versions.rxjava2 = "2.1.3"
versions.soloader = "0.8.2"
versions.timber = "4.7.1"
versions.transition = "1.3.0"
versions.truth = "1.0.1"
versions.work = "2.2.0"
ext.versions = versions

def build_versions = [:]
build_versions.min_sdk = 14
build_versions.min_sdk = 15
build_versions.compile_sdk = 29
build_versions.target_sdk = 29
build_versions.build_tools = "29.0.3"
@@ -215,6 +217,12 @@ work.firebase = "androidx.work:work-firebase:$versions.work"
work.runtime_ktx = "androidx.work:work-runtime-ktx:$versions.work"
deps.work = work

def facebook = [:]
facebook.flipper = "com.facebook.flipper:flipper:$versions.flipper"
facebook.noopflipper = "com.facebook.flipper:flipper-noop:$versions.flipper"
facebook.soloader = "com.facebook.soloader:soloader:$versions.soloader"
deps.facebook = facebook

ext.deps = deps

def addRepos(RepositoryHandler handler) {

0 comments on commit 274ea57

Please sign in to comment.