Skip to content
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

Convert Plaid to use AndroidX #524

Merged
merged 17 commits into from
Oct 21, 2018
Merged

Convert Plaid to use AndroidX #524

merged 17 commits into from
Oct 21, 2018

Conversation

tiembo
Copy link
Collaborator

@tiembo tiembo commented Oct 12, 2018

No description provided.

android:layout_height="match_parent"
android:clipToPadding="false"
tools:context=".ui.HomeActivity">
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we revert this weird formatting?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why GitHub isn't showing the updated whitespace changes. I'll check this again before merging.

build.gradle Outdated
'ktlint' : '0.24.0',
'lifecycle' : '1.1.1',
'legacy_support' : '1.0.0',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This name seems strange?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Split into a few different versions - androidx, legacyCoreUtils, and material. androidx feels generic though - suggestions for something better?

build.gradle Outdated
'mockito' : '2.23.0',
'mockito_kotlin' : '2.0.0-RC3',
'okhttp' : '3.10.0',
'retrofit' : '2.4.0',
'retrofitCoroutines': '0.9.2',
'room' : '1.1.1',
'room' : '2.1.0-alpha01',
'supportLibrary' : '27.1.1',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be removed now?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! 🎉

api "com.android.support:support-dynamic-animation:${versions.supportLibrary}"
api "androidx.constraintlayout:constraintlayout:${versions.constraintLayout}"
api "androidx.browser:browser:${versions.legacy_support}"
api "com.google.android.material:material:${versions.legacy_support}"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move down to maintain alphabetic order?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved it down, though I wanted to avoid alphabetizing the list to limit the PR size.

@@ -17,8 +17,10 @@

package io.plaidapp.core.ui.recyclerview;

import androidx.recyclerview.widget.RecyclerView;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we avoid imports just for doc links?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


}

dataBinding {
enabled true
}

dependencies {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be in the other deps block below?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - moved.

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: can we stick to the bin distribution?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@@ -62,20 +61,20 @@ internal class AboutViewModel @Inject constructor(
)

val about1 = SpannableString(resources.getString(R.string.about_plaid_1))
about1 += AlignmentSpan.Standard(Layout.Alignment.ALIGN_CENTER)
// about1 += AlignmentSpan.Standard(Layout.Alignment.ALIGN_CENTER)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like the plus overload was removed in 1.0.0.
If I remember correctly, they removed it because of a low API usability. you couldn't tell what that plus would really do.
We should create an extension function to Spannable, doing the functionality that used to be here

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ported over plusAssign extension function from android-ktx

@florina-muntenescu
Copy link
Collaborator

What's missing to remove the [WIP] label?

Looks like things are failing due to CI issues with instrumented tests but the code seems to be all good.
@tiembo - any idea what's up with the tests? I think this is quite a big (and important change) so, if the CI issue can't be fixed, I'd be happy to have this merged soon (depending on what's keeping this a WIP, of course)

@tiembo tiembo changed the title [WIP] Convert Plaid to use AndroidX Convert Plaid to use AndroidX Oct 21, 2018
@tiembo
Copy link
Collaborator Author

tiembo commented Oct 21, 2018

@florina-muntenescu fixed the instrumentation tests and removed [WIP] from the title. Ready for final review; feel free to merge if everything looks ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants