ticofab / android-gpx-parser

A library to parse XML Gpx files, built for Android.
Apache License 2.0
123 stars 44 forks source link

Kotlin #33

Closed msbit closed 3 years ago

msbit commented 3 years ago

Convert Java to Kotlin.

Should address https://github.com/ticofab/android-gpx-parser/issues/24

msbit commented 3 years ago

Seems to be working fine, when running against the app included as part of this repository. I've noticed some Android tests, and I've attempted to run them on my device; I'm actually not sure what I am meant to see, but there are no failures if that's worth anything :)

Now that you're packaging through jitpack you can add:

implementation 'com.github.msbit:android-gpx-parser:1df905685611b9e6a86f4dc96558c3969b8a8267'

to do a fully packaged test.

ticofab commented 3 years ago

Thanks @msbit for this PR! I will take some time to properly go through it, hopefully this weekend or next week :)

msbit commented 3 years ago

All good mate, it should be a relatively straight-forward conversion, so hopefully no surprises.

The only (intentional) functional change is https://github.com/ticofab/android-gpx-parser/pull/33/commits/bc287d4450c90905b03640c755b54affa53419f5, which is preparatory work for the fact that, as per the docs:

In Kotlin, outer class does not see private members of its inner classes.
msbit commented 3 years ago

Hey mate, still no rush on this, just checking in to see if you need anything else from me on it 👍🏻

ticofab commented 3 years ago

Hey man, sorry for taking so long. I kinda looked inside myself and realized that as long as Android & Kotlin fully support Java... well, if it ain't broken, don't fix it. Given the way things are, this overhaul only presents risks and no concrete benefits. I am truly grateful for the work that you put in, and I hope you will understand if I don't merge this PR. The other PR you opened will be part of the next release. Thanks again.

msbit commented 3 years ago

Hey mate. All good, I do understand. I don't think Java is going anywhere when it comes to Android development, and I can also see how it may have looked like Kotlin was going to steamroll over it a couple of years ago when you first raised the issue.

👍🏻

ticofab commented 3 years ago

Thanks for being so understanding. And I have an additional question -- are you actually Tom, friend of Stephen?

msbit commented 3 years ago

Yep, that's me mate :)

ticofab commented 3 years ago

Holy F ---- TOM !!! 😄 How did you end up here? Are you actually using my library??? Ha that's so funny!! Did you know it was me??

msbit commented 3 years ago

Hmm, yeah good question. I think I probably connected on LinkedIn, then looked through your socials and followed you here?

I'm not actually using the library, but I saw it come up on my feed because you'd just done the 2.0 release. Then I saw the Kotlin issue and thought I'd have a go, to pick up a bit more Kotlin experience etc. It's good to see that other projects are using it though, nice work!

So yeah, I knew it was you all along :) I actually reckon that photo you're using was one of the ones taken when you visited me and Damo yonks ago!

ticofab commented 3 years ago

Oh man that's like the funniest thing! 😄 Yep definitely my profile pic is from those times. Actually I took it in South America where I flew just after visiting you and Damo. I wish Australia was closer man. We haven't crossed paths since 2015!

msbit commented 3 years ago

Yeah we are a looooong way away :)

2015, of course, god time flies.