Skip to content

Kayan

Merge base config with optional overrides, validate it at build time, and read the generated Kotlin values from shared code.

One API in shared code

Kayan generates a typed object in commonMain, or in main for JVM and Android. Shared code can read config without an Android-only BuildConfig.

A fixed merge order

Base defaults, flavor values, and optional external overrides follow one documented precedence order. A branded build only needs a config file, not a fork of the app.

A schema owned by the app

The consuming build declares its keys and Kotlin property names. Kayan checks missing values and type mismatches before it generates source. Strict mode rejects unknown keys too.

Use cases

  • Gradual migration away from BuildConfig
  • White-label products with one shared base config
  • Multi-module builds that share one config file
  • Target-specific KMP values through expect / actual
  • Compile-time feature flags and endpoints
  • Generated JSON Schema and Markdown docs

Built-in schema types

  • string, boolean, int, long, double
  • stringMap, stringList, stringListMap
  • enumValue for normalized enum generation
  • custom adapters for consumer-owned types