-
Notifications
You must be signed in to change notification settings - Fork 660
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[runtime] remove androidx.startup
dependency
#5761
Conversation
✅ Deploy Preview for apollo-android-docs canceled.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -21,6 +23,10 @@ fun Project.configureAndroid( | |||
getCatalogVersion("android.sdkversion.min").toInt() | |||
} | |||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | |||
|
|||
if (this is LibraryVariantDimension) { | |||
multiDexEnabled = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test APK grew over 64k methods 🤷 .
Interestingly, it's not the case on those 2 screenshots (I think? but somehow two dex files are still required 🤷 )
In all cases, it's close enough that it may happen again. Plus AGP enables it by default if minSdk > 21
anyways.
No place for degrowth in dex-land 🌱 🙈
androidx.startup
is not always available (unit tests for an example but also some other cases) and more generally, it's confusing to have theNetworkMonitor
fail silently ifandroidx.startup
doesn't work or if theREAD_NETWORK_STATE
permission is not granted.In order to use
failFastIfOffline
andwaitForNetwork()
, you'll have to opt-in explicitely (I added some documentation here):It means you can't create a
NetworkMonitor
fromcommonMain
, you'll have to expect/actual it but at this point, I think it's just more consistent.Also take this opportunity to
ConnectivityManager
on a background thread. See Lazily register component callbacks and the network observer on Android. coil-kt/coil#2104ApolloClient.Builder.retryOnErrorInterceptor()
. The interceptor is added unconditionally. It can be disabled by settingfailfastOnError = false
andretryOnError = false
(default)See #5760
See #5720