appium-espresso-driver icon indicating copy to clipboard operation
appium-espresso-driver copied to clipboard

Kotlin Conversion

Open dpgraham opened this issue 6 years ago • 2 comments

Because Kotlin is fully interoperable with Java, and .kt and .java files can mix-and-match, we can do this conversion piece-by-piece instead of just one big, messy refactor.

Here's my recommended ordering

  • Convert the unit tests
    • Convert the files to .kt
    • Rename test functions and classes using the backticks naming convention
      • e.g.: fun shouldDoAThing becomes fun `should do a thing`
  • Convert source files in this order
    • ViewAction
    • ViewActionMatcher
    • Models
    • HTTP
    • Handlers
    • Helpers (the W3C conversion may be messy)

Each step of the way, convert one file at a time and always check that the JUnit tests pass. Do any refactoring that fixes any broken tests. Run the e2e tests too. This will expose any other broken code.

Since, as said above, we can do it piece-by-piece, we can do several pull requests and don't need to do it in just one.

dpgraham avatar Jan 17 '19 20:01 dpgraham

I'd rather convert from top to bottom. Handlers first, as they don't have any dependencies

mykola-mokhnach avatar Jan 17 '19 20:01 mykola-mokhnach

Actually yeah, Handlers can be moved above Models

dpgraham avatar Jan 17 '19 21:01 dpgraham