Fix sample app build
Summary: Two fixes included in this one. The debug flag is obvious, the annotations less so. I'll try and find the right place to document this, but the reason we need this here is because we reflect on `Prop.class`, so these need to be available at runtime. Reviewed By: jknoxville Differential Revision: D9766713 fbshipit-source-id: 269b5a60c0df644f4fda0ea289ef9dc392ee352b
This commit is contained in:
committed by
Facebook Github Bot
parent
6f1e011a8b
commit
c495c53cd4
@@ -27,7 +27,7 @@ dependencies {
|
||||
// Litho
|
||||
implementation deps.lithoCore
|
||||
implementation deps.lithoWidget
|
||||
compileOnly deps.lithoAnnotations
|
||||
implementation deps.lithoAnnotations
|
||||
annotationProcessor deps.lithoProcessor
|
||||
|
||||
// Third-party
|
||||
|
||||
@@ -4,6 +4,7 @@ package com.facebook.flipper.sample;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import com.facebook.litho.config.ComponentsConfiguration;
|
||||
import com.facebook.soloader.SoLoader;
|
||||
import com.facebook.sonar.android.AndroidSonarClient;
|
||||
import com.facebook.sonar.core.SonarClient;
|
||||
@@ -39,6 +40,9 @@ public class FlipperSampleApplication extends Application {
|
||||
.writeTimeout(10, TimeUnit.MINUTES)
|
||||
.build();
|
||||
|
||||
// Normally, you would want to make this dependent on a BuildConfig flag, but
|
||||
// for this demo application we can safely assume that you always want to debug.
|
||||
ComponentsConfiguration.isDebugModeEnabled = true;
|
||||
LithoSonarDescriptors.add(descriptorMapping);
|
||||
client.addPlugin(new InspectorSonarPlugin(this, descriptorMapping));
|
||||
client.addPlugin(networkPlugin);
|
||||
|
||||
Reference in New Issue
Block a user