Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

1K
Views
What's the difference between .kt and .kts files in Kotlin. When should we use .kts file over .kt file?

What is the purpose of using .kts files in Kotlin? Are these files included in the app bundle when releasing the app?

enter image description here

over 4 years ago · Hanz Gallego
2 answers
Answer question

0

.kt — normal source files, .kts — script files

The .kts files are those that run as script files, without a need for separate compilation. it is run using the following command:

kotlinc -script <filename>.kts

You don't need main function in a .kts file, It will be executed line by line just like a bash/python script.

over 4 years ago · Hanz Gallego Report

0

.Kt and .Kts

  • They are all kotlin files that contain kotlin source code.
  • .kt file are assumed to be compiled by the kotlin compiler.
  • .Kts files are assumed to be executed by kotlin scriting support.

As Explained in kolinConf18

over 4 years ago · Hanz Gallego Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!