Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/theGlenn/flipper-android-no-op

No-op dependency for Flipper Android release mode
https://github.com/theGlenn/flipper-android-no-op

android android-library

Last synced: 3 months ago
JSON representation

No-op dependency for Flipper Android release mode

Awesome Lists containing this project

README

        

# flipper-android-no-op
No-op dependency when using Flipper Android in **release** mode.

[![](https://jitpack.io/v/theGlenn/flipper-android-no-op.svg)](https://jitpack.io/#theGlenn/flipper-android-no-op)
![GitHub](https://img.shields.io/github/license/theglenn/flipper-android-no-op.svg)
[![Contribute](https://img.shields.io/badge/contributions-friendly-b44ac1.svg)](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github)

## Getting started

In your `build.gradle`:

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

dependencies {
//The important part
def flipper_version = '0.191.1'
debugImplementation "com.facebook.flipper:flipper:$flipper_version"
debugImplementation "com.facebook.flipper:flipper-network-plugin:$flipper_version"
debugImplementation "com.facebook.flipper:flipper-leakcanary2-plugin:$flipper_version"
debugImplementation 'com.facebook.soloader:soloader:0.10.4'

// debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.9.1'

// Include `flipperandroidnoop` and `soloadernoop` individually
releaseImplementation 'com.github.theGlenn.flipper-android-no-op:flipperandroidnoop:0.11.4'
releaseImplementation 'com.github.theGlenn.flipper-android-no-op:soloadernoop:0.11.4'

// Includes both libraries
releaseImplementation 'com.github.theGlenn:flipper-android-no-op:0.11.4'
}
```

In your `Application` class same as [this](https://fbflipper.com/docs/getting-started/android-native#application-setup) :
```java
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(NetworkFlipperPlugin())
client.addPlugin(new InspectorFlipperPlugin(this, DescriptorMapping.withDefaults()));
client.start();
}
}
}
```