GSoC 2023 Proposal Review: Kotlin support (Android Mode)

I wish to contribute to Kotlin support (Android Mode) as part of GSoC.
Tagging potential mentor @AdityaRana

Could you please review the draft of my proposal
Please correct me if I’ve understood things incorrectly
Thanks! :wave:


Hi @stark9190 , thanks for the interest in Procesing Foundation. I will review proposal and leave comments.

Please enable comments in the doc.


1 Like

hi @stark9190 , I have read the proposal, following are my few cents on your prpopsal:

  • Its not clear exactly what you want to do in the propsal :frowning:
  • I think you have misunderstood the project idea, according to you - you want to add kotlin-native suport in the project but this work has already been done my me in back in 2020.
  • After reading proposal what I understood is you want to port kotlin-native mode into android-mode, its not possible because kotlin-native mode came out from android-mode :confused: , you can get this after looking into the github repository, it was forked from android-mode.
  • Proposal doesnot include any hyperlinks directs, but I can see it has hyperlinks.
  • You have mentioned few interesting ideas like adding support for multiple langauges, but you have not specified how you will be going to do that.

Few suggestions to make proposal:

  • whenever you are suggesting to do anything in proposal, you should also tell how you will be going to execute them otherwise its just a random idea which you dont know how to execute !
  • Try to make propsal with all the execution plans coding wise, this will give reviewer idea what you want to do in which manner, may be you dont know the existing architecture but reviewer knows it very well, so this will give us power to understand whether its possible or not even !

Aditya Rana

1 Like

Hey @AdityaRana

Thanks a lot for the feedback! I will refine and add specific details on how I intend to execute the solution

I just had some confusion around the problem statement based on what you’ve mentioned

A GSoC project adapted the Android mode to support Kotlin, and released it as its own separate mode. Finding ways to continue supporting this mode or even integrating it back into the Android mode could help bring Android developers who prefer Kotlin into Processing.

It states that we need to find ways to support the kotlin-native-mode project and integrating it back to Android mode

If I understand this right, does the project aims at combining both the repositories? or do we just want to migrate from java to kotlin in the processing-android repository?

from where did you pull these lines ?

and when this post was posted ? in 2023 ?

for your understanding - both projects can never be merged into single project because one was forked from other. One focuses on only android and other focuses on both android and iOS. Both will not going to be single repo but instead we will start using kotlin-native mode once its ready for stable distribution.

Reason: one using java purely, other using kotlin-native. project structure for both projects are completely different. first one using normal java multi module strucure, latter on uses multiplatform structure.

Compilation of java and kotlin is entirely different, one uses direct compilation and other uses staged compilation. Java converts code into classes / dex files. Kotlin achieves multiplatfirm support via IR binaries, etc etc. I cannot explain more about it, once you start working on kotlin and java in-depth you will get it why I am saying this.

refer this to understand more

Just to make more clarity to you about the support-kotlin-native project:

What has been done → java code has been rewritten into kotlin code, every Processing API is running on jvm based (android) devices, I have tested it on many different android version real devices.Some files weren’t able to converted into kotlin because of engineering challenges which were not able to resolve that time, reasons I have listed in my final report. If you want to read that, you are just a google search away to get it, its public on medium.

Work so far done by me in this project is stable and none of the code is breaking at any point.

Whats next in this project → now we need to implement renderes for iOS from scratch so that anyone casn use same mode for android and iOS. Work is not just to implement renderers, you have to figure out which part of the mode is responsible for logic layer and which part can be used from common interfaces in multiplatform. So work is to make processing APIs running on iOS devices as well just like I have anabled it for android (jvm) devices.

I am open to discussion about it more in depth !

Aditya Rana


Hey yes I believe so this was posted for GSoC 2023

Link to the project I am referring to, I’ll read the explanation you have shared and try to understand more and come back with questions I have

Thanks a lot for the detailed explaination

Hey @AdityaRana
Had time to go over the repo and understand what you meant.
What you’ve described makes sense to build on the kotlin-native-mode project for processing.

However the project list does not mentions this and that’s where I am confused.
Let me know what you think about the project link I’ve sent, and maybe could you please elaborate on the mentioned problem statement?

Thanks! :wave: And wishing you a great weekend :slight_smile:

Hi all,
I was also planning to write a design proposal for this project but after reading this discuss thread, I am also confused by the project statement. So according to the discussion above, we are supposed to

1, add one more “ios” folder processing-for-kotlin/kotlin-native-mode/tree/main/core/src/processing (sibling of the “android” folder name) which is going to hold ios-platform View (written in kotlin) handling

2, add one more “src/processing/mode/ios” processing-for-kotlin/kotlin-native-mode/tree/main/mode (sibling of the “src/processing/mode/android” folder) to support IOS mode installation/playing in PDE

However, I am confused by our ultimate goal, in PDE, how many new mode(s) we want to support? For now

However, with kotlin, we can support

  1. Kotlin mode
  2. Android Mode (Java) (which already exist)
  3. Android Mode (Kotlin) (The one we need to integrated into PDE?, @AdityaRana already have the code ready in kotlin-native-mode
  4. Kotlin Native (IOS)
  5. Kotlin Native (Android) (This mode is actually the same as the third one?)

Also, it is super confusing to talking about kotlin-native and kotlin-mpp Is kotlin MPP different than Kotlin Native? - Stack Overflow
Any more clarification?