/flipper-android-no-op

No-op dependency when using Flipper Android in release mode

Primary LanguageKotlinMIT LicenseMIT

flipper-android-no-op

No-op dependency when using Flipper Android in release mode.

GitHub Contribute

Getting started

In your build.gradle:

allprojects {
  repositories {
    ...
    maven { url 'https://jitpack.io' }
  }
}
...

dependencies {
  //The important part
  releaseImplementation 'com.github.theGlenn:flipper-android-no-op:0.3.0'
  debugImplementation 'com.facebook.soloader:soloader:0.5.1'
  debugImplementation 'com.facebook.flipper:flipper:0.23.4'
}

In your Application class same as this :

public class MyApplication extends Application {

  @Override public void onCreate() {
    super.onCreate();
    SoLoader.init(this, false);

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