Issue
What is the purpose of using .kts files in Kotlin? Are these files included in the app bundle when releasing the app?
Solution
.kt — normal source files, .kts — script files
You don't need the main function in a .kts file, It will be executed line by line just like a bash/python script.
The .kts files don't a need for separate compilation. it is run using the following command:
kotlinc -script <filename>.kts
Answered By - Govinda Sakhare

0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.