[Android] Kotlin for app & plugin & capacitor codebase?
See original GitHub issueHi guys,
I’ve been browsing the capacitor source code and was wondering if you are open to modernizing & cleaning up the android codebase and plugin/app templates that are generated by npx @capacitor/cli plugin:generate
, npx @capacitor/cli create
and npx cap init
.
I’m thinking: more recent Android gradle plugin, less unused boiler plate (that android studio project templates create, e.g. local jar dependencies, test dependencies on unused libraries, unused proguard files etc.), kotlin & androidx setup by default, app/plugin code generated in Kotlin.
If you are open to this I could contribute a pull request with what i have in mind and we can continue discussion based on that. If not - no hard feelings 😉
Cheers Nemo
Issue Analytics
- State:
- Created 5 years ago
- Reactions:13
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Capacitor Android Plugin Guide
Capacitor Android Plugin Guide. Building Capacitor plugins for Android involves writing Java or Kotlin to interface with Android SDKs.
Read more >Writing a native Ionic plugin for Capacitor in less than 30 ...
Learn to access native code from your cross-platform Ionic app by creating a native plugin with Capacitor.
Read more >Building Cross-Platform Apps with Capacitor | Ionic Article
Build cross-platform apps from a shared codebase using Ionic Capacitor and develop applications that work seamlessly across iOS and Android.
Read more >Ionic Capacitor Tutorial - Getting Started with Capacitor
With Ionic Capacitor, adding native functionality to our apps can be easily done using a simple Plugin API for Java on Android, ...
Read more >Building Web Native Apps with Capacitor 3 - YouTube
Build for native with the web development skills you already have. Capacitor is Ionic's native runtime that makes it easy to build web...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I agree that this is a major change and therefore too late for Capacitor 3 (but I hope that Capacitor 4 is doable).
Kotlin interops well with Java, but the native Android community is moving towards “Kotlin first”. To keep up with the Android world, the question is not if, but when the move should be made. It already starts with the template app: If the template app is written in Kotlin, then it is faster to get up to speed with a decent Android setup.
Moreover, if done right, Kotlin could improve the quality of the Android code (for example, preventing random NullpointerExceptions like https://github.com/ionic-team/capacitor/pull/3553).
Sure, we are open, but please, if you do it don’t do it all at once, better send small PRs that can be easily reviewed and tested as I don’t have experience with Kotlin