Skip to content

Commit

Permalink
build: remove flipper dependencies (#3847)
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo <[email protected]>
  • Loading branch information
Balcan authored Oct 28, 2024
1 parent 85356ad commit 6a7ea65
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 114 deletions.
9 changes: 0 additions & 9 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -287,15 +287,6 @@ dependencies {

coreLibraryDesugaring(libs.desugar)

debugImplementation(libs.analytics.flipper)
debugImplementation(libs.analytics.soloader)
debugImplementation(libs.analytics.flipper.network)
debugImplementation(libs.analytics.flipper.leak)
debugImplementation(libs.analytics.leakcanary)

releaseImplementation(libs.analytics.leakcanary.noop)
releaseImplementation(libs.analytics.flipper.noop)

"dhisPlayServicesImplementation"(libs.google.auth)
"dhisPlayServicesImplementation"(libs.google.auth.apiphone)

Expand Down
2 changes: 0 additions & 2 deletions app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@

<activity android:name=".usescases.development.DevelopmentActivity" />

<service android:name="com.facebook.flipper.plugins.leakcanary.RecordLeakService" />

</application>

</manifest>
58 changes: 0 additions & 58 deletions app/src/debug/java/org.dhis2/data/appinspector/AppInspector.kt

This file was deleted.

8 changes: 0 additions & 8 deletions app/src/main/java/org/dhis2/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import org.dhis2.commons.schedulers.SchedulersProviderImpl;
import org.dhis2.commons.service.SessionManagerModule;
import org.dhis2.commons.sync.SyncComponentProvider;
import org.dhis2.data.appinspector.AppInspector;
import org.dhis2.data.dispatcher.DispatcherModule;
import org.dhis2.data.server.SSLContextInitializer;
import org.dhis2.data.server.ServerComponent;
Expand Down Expand Up @@ -103,16 +102,13 @@ public class App extends MultiDexApplication implements Components, LifecycleObs

private boolean fromBackGround = false;
private boolean recreated;
private AppInspector appInspector;

@Override
public void onCreate() {
super.onCreate();

ProcessLifecycleOwner.get().getLifecycle().addObserver(this);

appInspector = new AppInspector(this).init();

MapController.Companion.init(this);

setUpAppComponent();
Expand Down Expand Up @@ -360,10 +356,6 @@ private void setUpRxPlugin() {
});
}

public AppInspector getAppInspector() {
return appInspector;
}

@Override
public FeatureConfigActivityComponent provideFeatureConfigActivityComponent() {
return userComponent.plus(new FeatureConfigActivityModule());
Expand Down
3 changes: 0 additions & 3 deletions app/src/main/java/org/dhis2/data/server/ServerModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,6 @@ class ServerModule {
fun getD2Configuration(context: Context): D2Configuration {
val interceptors: MutableList<Interceptor> =
ArrayList()
context.app().appInspector.flipperInterceptor?.let { flipperInterceptor ->
interceptors.add(flipperInterceptor)
}
interceptors.add(
AnalyticsInterceptor(
AnalyticsHelper(context.app().appComponent().matomoController()),
Expand Down
12 changes: 0 additions & 12 deletions app/src/release/java/org/dhis2/data/appinspector/AppInspector.kt

This file was deleted.

1 change: 1 addition & 0 deletions commons/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ dependencies {
api(libs.dhis2.android.sdk) {
exclude("org.hisp.dhis", "core-rules")
exclude("com.facebook.flipper")
exclude("com.facebook.soloader")
this.isChanging = true
}

Expand Down
16 changes: 0 additions & 16 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,6 @@ mapboxannotation = "0.8.0"
matomo = "4.1.2"
sentry = "7.14.0"
timber = "5.0.1"
flipper = "0.161.0"
flippernoop = "0.161.0"
soloader = "0.10.4"
flippernetwork = "0.161.0"
flipperleak = "0.161.0"
leakcannary = "2.9.1"
leakcannarynoop = "1.6.3"
rxlint = "1.6"
crashactivity = "2.3.0"
zxing = "3.5.0"
Expand Down Expand Up @@ -168,13 +161,6 @@ barcodeScanner-zxing-android = { group = "com.journeyapps", name = "zxing-androi
lottie = { group = "com.airbnb.android", name = "lottie", version.ref = "lottie" }
lottie-compose = { group = "com.airbnb.android", name = "lottie-compose", version.ref = "lottie" }
analytics-matomo = { group = "com.github.matomo-org", name = "matomo-sdk-android", version.ref = "matomo" }
analytics-flipper = { group = "com.facebook.flipper", name = "flipper", version.ref = "flipper" }
analytics-flipper-network = { group = "com.facebook.flipper", name = "flipper-network-plugin", version.ref = "flippernetwork" }
analytics-flipper-leak = { group = "com.facebook.flipper", name = "flipper-leakcanary-plugin", version.ref = "flipperleak" }
analytics-flipper-noop = { group = "com.facebook.flipper", name = "flipper-noop", version.ref = "flippernoop" }
analytics-soloader = { group = "com.facebook.soloader", name = "soloader", version.ref = "soloader" }
analytics-leakcanary = { group = "com.squareup.leakcanary", name = "leakcanary-android", version.ref = "leakcannary" }
analytics-leakcanary-noop = { group = "com.squareup.leakcanary", name = "leakcanary-android-no-op", version.ref = "leakcannarynoop" }
analytics-rxlint = { group = "nl.littlerobots.rxlint", name = "rxlint", version.ref = "rxlint" }
analytics-customactivityoncrash = { group = "cat.ereza", name = "customactivityoncrash", version.ref = "crashactivity" }
analytics-timber = { group = "com.jakewharton.timber", name = "timber", version.ref = "timber" }
Expand Down Expand Up @@ -238,8 +224,6 @@ table-androidTest = ["test-compose-ui-test", "test-uiautomator", "test-junitKtx"
stock-implementation = ["androidx-activity-compose", "androidx-annotation", "rx-relay", "security-openId", "androidx-preferenceKtx", "androidx-work", "androidx-workgcm", "androidx-activityKtx", "androidx-lifecycle-viewmodel-compose", "analytics-customactivityoncrash", "dagger-hilt-android"]
stock-core = ["desugar"]
stock-kapt = ["dagger-hilt-compiler"]
stock-debugImplementation = ["analytics-flipper", "analytics-soloader"]
stock-releaseImplementation = ["analytics-flipper-noop"]
stock-test = ["test-mockitoKotlin", "test-mockitoInline", "test-archCoreTesting", "test-javafaker", "test-kotlinCoroutines"]
tracker-implementation = ["androidx-lifecycle-viewmodel-compose", "androidx-activity-compose"]
tracker-test = ["test-mockitoCore", "test-mockitoInline", "test-mockitoKotlin", "test-testCore", "test-archCoreTesting", "test-kotlinCoroutines"]
6 changes: 0 additions & 6 deletions stock-usecase/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,7 @@ dependencies {
testImplementation(project(":dhis_android_analytics"))
coreLibraryDesugaring(libs.bundles.stock.core)
kapt(libs.bundles.stock.kapt)
debugImplementation(libs.bundles.stock.debugImplementation)
releaseImplementation(libs.bundles.stock.releaseImplementation)
testImplementation(libs.bundles.stock.test)

debugImplementation(libs.analytics.flipper.network) {
exclude("com.squareup.okhttp3")
}
}

kapt {
Expand Down

0 comments on commit 6a7ea65

Please sign in to comment.