Konf Versions Save

A type-safe cascading configuration library for Kotlin/Java/Android, supporting most configuration formats

v0.17.1

4 years ago
  • fix: Loader#watchFile doesn't work on macOS
  • build: update dependencies
  • build: support Github Actions
  • build: disable Aliyun Maven repository by default

v0.17.0

4 years ago

Major Features and Improvements

  • feature: migrate to tree-based source APIs
  • feature: support merge operation for sources
  • feature: support withFallback API for config spec
  • fix: fix formatting bug in toml4j's writer when map is in nested list
  • fix: filter invalid variables in environment
  • refactor: unify info and context in Source API

Breaking Changes

After migrated to tree-based source APIs, many deprecated APIs are removed, including:

  • Source: all isXXX and toXXX APIs
  • Config: layer, addSource and withSourceFrom

v0.16.0

4 years ago

feature: support JavaScript source using GraalVM JavaScript

v0.15.1

4 years ago

fix: doesn't close input/output stream in provider/writer

v0.15

4 years ago

Major Features and Improvements

Konf is modularized, now you can use different modules for different sources without unnecessary dependencies.

Breaking Changes

After modularized Konf, hocon/toml/xml/yaml/git/watchGit in DefaultLoaders become extension properties/functions and should be imported explicitly. For example, you should import com.uchuhimo.konf.source.hocon before using config.from.hocon; in Java, config.from().hocon is unavailable, please use config.from().source(HoconProvider.INSTANCE) instead.

v0.14.1

4 years ago

Major Features and Improvements

  • feature: support optional sources
  • feature: support empty list and single element list in flat source
  • feature: add config.containsRequired() (return true/false) and config.validateRequired() (throw exception instead) to check whether all values of required items exist in config or not
  • feature: leading or trailing whitespaces are allowed in item name / path
  • feature: support onSet for Item
  • fix: support HOCON substitutions
  • fix: default values in facade config now have lower priority than the values in fallback config

v0.13

5 years ago

Major Features and Improvements

  • feature: add support for nested config spec
  • feature: infer config spec prefix automatically
  • fix: load keys from the system environment case-insensitively
  • feature: remove experimental corountine APIs

v0.12

5 years ago

Major Features and Improvements

  • feature: add mapped API for DefaultLoaders
  • feature: If FAIL_ON_UNKNOWN_PATH enabled, an exception is thrown when loading from the source to indicate it contains unknown paths

v0.11

5 years ago

Major Features and Improvements

  • feature: support user-defined extension in DefaultLoaders
  • feature: support prefix operations for Source/Config/ConfigSpec
  • feature: support ad-hoc config item
  • feature: support to cast config to a specified class
  • feature: support merge operations for Source/Config/ConfigSpec
  • feature: support to load source from git
  • feature: support nullable type in Config/Source/Writer
  • gradle: update dependencies
    • Kotlin: 1.2.30 -> 1.2.51

v0.10

6 years ago

Major Features and Improvements

  • feature: support to automatically detect item name in ConfigSpec
  • feature: support auto-detected URL format
  • feature: support auto-detected watched URL format
  • feature: support to parse comma separated values in the flat source
  • feature: support export config as the comma-separated format for flat source writers
  • gradle: update dependencies
    • Kotlin: 1.2.21 -> 1.2.30

Breaking Changes

APIs in ConfigSpec have been updated to support item name's auto-detection, please migrate to new APIs. Here are some examples:

  • val host = optional("host", "0.0.0.0") to val host by optional("0.0.0.0")
  • val port = required<Int>("port") to val port by required<Int>()
  • val nextPort = lazy("nextPort") { config -> config[port] + 1 } to val nextPort by lazy { config -> config[port] + 1 }

Thanks to our Contributors

Thanks to our contributors whose commits are featured in this release:

@DALDEI