-
Notifications
You must be signed in to change notification settings - Fork 50
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
Android X support #19
Comments
Out of curiosity and for prioritization, how many other libraries do you use that do not offer AndroidX versions? |
Quite a few, firebase and playservices being the main ones which Google will update one day. Jetifier adds to the build time but I imagine we will be using Jefitier for most of this year!
|
The build time is only paid once per machine, per version though since the output is cached and re-used. There's no actual build-to-build overhead. There's still downsides, though. |
This is far, far, down my backlog. So if someone wants to take a crack at
it, PR welcome.
…On Wed, Mar 27, 2019 at 10:50 PM markchristopherng ***@***.***> wrote:
Quite a few, firebase and playservices being the main ones which Google
will update one day.
Jetifier adds to the build time but I imagine we will be using Jefitier
for most of this year!
- com.jakewharton.espresso:okhttp3-idling-resource:1.0.0
- com.squareup.rx.idler:rx2-idler:0.9.1
- com.squareup.leakcanary:leakcanary-android:1.6.1
- com.google.android.gms:play-services-auth:16.0.1
- com.google.android.gms:play-services-maps:16.1.0
- com.google.android.gms:play-services-location:16.0.0
- com.google.android.gms:play-services-awareness:16.0.0
- com.google.android.gms:play-services-auth-api-phone:16.0.0
- com.google.firebase:firebase-messaging:17.4.0
- com.google.firebase:firebase-ml-vision:19.0.2
- com.google.firebase:firebase-core:16.0.7
- me.dm7.barcodescanner:zxing:1.9.8
- com.github.JakeWharton:ViewPagerIndicator:2.4.1
- com.github.barteksc:android-pdf-viewer:2.8.2
- com.google.firebase:firebase-messaging:17.4.0
- com.google.android.support:wearable:2.4.0
- com.google.android.gms:play-services-wearable:16.0.1
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#19 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEEEUNwHC3tHNtM8LlRiPntZpDPURyNks5vbC4BgaJpZM4cPKgq>
.
|
nice, can this be released in a new version? :) |
We actually want to avoid using Jetifier because of the following issue: https://stackoverflow.com/questions/57363475/how-can-i-lazily-depend-on-an-aar-that-created-by-a-task This is one of the last libraries we use that has not been upgraded to AndroidX, so if the PR could be accepted, it would be 👍 |
One workaround is to use both the support lib and AndroidX in the same module without jetifier. import com.jakewharton.espresso.OkHttp3IdlingResource
import android.support.test.espresso.IdlingResource as SupportIdlingResource
import android.support.test.espresso.IdlingResource.ResourceCallback as SupportResourceCallback
import androidx.test.espresso.IdlingResource as AndroidXIdlingResource
import androidx.test.espresso.IdlingResource.ResourceCallback as AndroidXResourceCallback
/**
* Allows [SupportIdlingResource] and [AndroidXIdlingResource] to exist in the same module.
*
* This will be needed until [OkHttp3IdlingResource] is migrated to AndroidX.
* https://github.com/JakeWharton/okhttp-idling-resource/issues/19#issuecomment-518369287
*/
internal fun SupportIdlingResource.asAndroidX(): AndroidXIdlingResource = AndroidXIdlingResource(this)
class AndroidXIdlingResource(private val delegate: SupportIdlingResource) : AndroidXIdlingResource {
override fun getName(): String = delegate.name
override fun isIdleNow(): Boolean = delegate.isIdleNow
override fun registerIdleTransitionCallback(callback: AndroidXResourceCallback) = delegate
.registerIdleTransitionCallback(callback.asSupport())
}
class SupportResourceCallback(private val delegate: AndroidXResourceCallback) : SupportResourceCallback {
override fun onTransitionToIdle() = delegate.onTransitionToIdle()
}
internal fun AndroidXResourceCallback.asSupport(): SupportResourceCallback = SupportResourceCallback(this) Then: OkHttp3IdlingResource.create(
"OkHttp", okHttpClient
)
.asAndroidX() |
Big effort by @ZakTaccardi
Usage:
|
@JakeWharton Do you have a recommendation on this library and/or a release coming? I feel like it should be "safe" and a good choice to use still right? |
@JakeWharton what about #20 ? It would be nice to get this thing merged. |
@JakeWharton now that all version above Espresso 3.1.0 is based on AndroidX, could you review your prioritization please ? |
I have no plans to work on this library. Feel free to fork it.
…On Thu, Nov 5, 2020, at 10:23 AM, Auré-Chan wrote:
@JakeWharton <https://github.com/JakeWharton> now that all version above Espresso 3.1.0 is based on AndroidX, could you review your prioritization please ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#19 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAAQIEPUAX24ULEIOBV4AALSOK7PPANCNFSM4HB4VAVA>.
|
@JakeWharton it would be nice to add a "Deprecated" message in the readme. Thanks for your work btw :) |
Hi
I ran the following plugin and it reports that this library requires jetifier and doesn't support Android X. Will you be releasing an Android X version soon.
https://github.com/plnice/can-i-drop-jetifier/tree/master/canidropjetifier/src/main/kotlin/com.github.plnice/canidropjetifier
The text was updated successfully, but these errors were encountered: