tree: 3e7f404ca4c5fb9f8d2ab630718050d7cba8ce1a [path history] [tgz]
  1. common/
  2. common-non-jvm/
  3. jdk7/
  4. jdk8/
  5. js/
  6. js-ir-minimal-for-test/
  7. jvm/
  8. jvm-minimal-for-test/
  9. native-wasm/
  10. samples/
  11. src/
  12. test/
  13. unsigned/
  14. wasm/
  15. build.gradle.kts
  16. gradle.properties
  17. kotlin-project-structure-metadata.beforePatch.json
  18. kotlin-project-structure-metadata.json
  19. ReadMe.md
libraries/stdlib/ReadMe.md

The Kotlin Standard Library

This module creates the standard library for Kotlin.

Code generation

We use code generation to generate some repetitive utility extension functions, e.g. for collection-like types: arrays, strings, Collection<T>, Sequence<T>, Map<K, V> etc. Those are defined in templates written in a special Kotlin-based DSL.

Generated sources are placed into the generated folder and their names are prefixed with an underscore, for example, generated/_Collections.kt

To run the code generator, use the following task:

./gradlew :tools:kotlin-stdlib-gen:run

Usage samples

If you want to author samples for the standard library, please head to the samples readme.