Anyone currently developing Android applications in Java should start migrating code to kotlin. It is that simple, the argument for this position, as outlined below, are compelling. However, there are many people who current develop apps using a tool other than Java, and for these people, the situation is far more complex, and I will also list the arguments against a move to kotlin at this time for apps not currently in Java.
Consider the following arguments for moving java apps to kotlin:
Google has announced kotlin as a ‘first class’ language for Android, and at the announced stated that kotlin has many features that make kotlin the language of choice for android development
- kotlin and java code can co-exist, and an application can migrate to kotlin file by file or even class by class ensuring no delays during migration
- there is automatic conversion from java code to kotlin code to enable almost automated conversion
- all main development environments for java (Intelij, Android Studio, Eclipse) also support kotlin, and the end-to-end toolkits are the same for java and kotlin projects
Now consider the points against in the different situation for non-java android apps:
- non-java solutions predominantly support android and iOS from the same code-base, kotlin support for iOS is at release 0.2 and not yet mature
- code cannot be mixed, so the entire application must be converted before any results of the conversion are available, testable, or able to be evaluated
- there is no automated code conversion other than from java
- significant document of kotlin is based on documenting only changes from java
- tool chains for kotlin significantly different from those of non-java android tool chains and these tools must also be learnt
- while the ‘gradle’ build tool generally favoured in the industry for building kotlin apps in moving to kotlin based scripts reducing the new steps to be learnt, this ‘kotlin script gradle’ is also in pre-release and current documentation is targeted at migrating existing gradle users, not new users
Two of these ‘against’ points are simply about timing, as they relate to components not yet at version 1.0. The ‘against’ list will get less and less compelling over time, but if converting a project, converting a ‘non-java’ android app is a big step.