Also in Kotlin 2.1.0, Kotlin Multiplatform introduces basic support for Swift export and makes it easier to publish Kotlin Multiplatform libraries. Swift export allows for…
Kotlin
-
-
import kotlinx.coroutines.* suspend fun launchTask(delayMillis: Long) { println(“START task $delayMillis”) delay(delayMillis) println(“END launchTask $delayMillis”) } fun main() = runBlocking { println(“start main”) val scope…
-
JetBrains plans to drop some scripting-related technologies from the Kotlin language, including REPL functionality, an obsolete API for Java scripting, the KotlinScriptMojo Maven plugin,…
-
fun StarWarsMovie.releaseYear(): Int { val year = release_date.substring(0, 4) return year.toInt() } val newHope = StarWarsMovie(“A New Hope”, 4, “1977-05-25”) val releaseYear = newHope.releaseYear()…
-
Add the following dependency to the dependencies section of /app/build.gradle.kts: implementation(“com.google.code.gson:gson:2.9.1”) This lets us handle the JSON we’ll get back from the API. Now,…
-
JetBrains has updated its Kotlin language roadmap, with key priorities that include more efficient data handling, increased abstraction, and enhanced performance. The company also…
- 1
- 2