jdiazcano / Cfg4k
Licence: apache-2.0
Flexible and easy to use config library written in kotlin
Stars: ✭ 73
Programming Languages
kotlin
9241 projects
Labels
Projects that are alternatives of or similar to Cfg4k
config
Simple configuration management for PHP
Stars: ✭ 15 (-79.45%)
Mutual labels: loader, configuration
Pioneer Console Boilerplate
Dependency injection, logging and configuration in a .NET Core console application.
Stars: ✭ 60 (-17.81%)
Mutual labels: configuration
Ins sandstorm
[INS] Config setting for our sandstorm server
Stars: ✭ 61 (-16.44%)
Mutual labels: configuration
Common Env
🔑 The only configuration library you will ever need
Stars: ✭ 67 (-8.22%)
Mutual labels: configuration
Dotfiles
🖥️ Automated Configuration, Preferences and Software Installation for macOS
Stars: ✭ 1,103 (+1410.96%)
Mutual labels: configuration
Server Qa Checks
A bunch of QA checks to run against one or more servers to make sure they are built to a specific standard.
Stars: ✭ 72 (-1.37%)
Mutual labels: configuration
Dotfile
Simple version control made for tracking single files
Stars: ✭ 71 (-2.74%)
Mutual labels: configuration
Neuron.js
A Full Feature CommonJS Module Manager, Dependency Graph Handler and Loader for Browsers
Stars: ✭ 66 (-9.59%)
Mutual labels: loader
Umatrix Rules Domain
uMatrix ruleset unbreaks all Alexa 100 and more at domain level
Stars: ✭ 66 (-9.59%)
Mutual labels: configuration
Pureconfig
A boilerplate-free library for loading configuration files
Stars: ✭ 1,114 (+1426.03%)
Mutual labels: configuration
Conf
Go package for loading program configuration from multiple sources.
Stars: ✭ 70 (-4.11%)
Mutual labels: configuration
Fiftyshadesof
An elegant context-care loading placeholder for Android
Stars: ✭ 1,110 (+1420.55%)
Mutual labels: loader
Markdown Component Loader
📑 Turn Markdown into dynamic, stateless React components
Stars: ✭ 71 (-2.74%)
Mutual labels: loader
Aspnetcore.services
Examples for ASP.NET Core webservices
Stars: ✭ 59 (-19.18%)
Mutual labels: configuration
Extracted Loader
It reloads extracted stylesheets extracted with ExtractTextPlugin
Stars: ✭ 67 (-8.22%)
Mutual labels: loader
Rime pure
【rime小狼毫\trime同文】手机/PC一站式配置【简约皮肤\拼音搜狗词库\原创trime同文四叶草九宫格拼音方案\四叶草拼音、小鹤双拼、极品五笔、徐码、郑码】 rime配置
Stars: ✭ 73 (+0%)
Mutual labels: configuration
Archlinux Installer
Arch Linux Installer,Install your Arch Linux more quickly
Stars: ✭ 72 (-1.37%)
Mutual labels: configuration
Overview
Cfg4k is a configuration library made for Kotlin in Kotlin!
Features
- Automatic reload
- Interface binding
- Ability to handle data classes automatically
- All the complex types and generics are supported
- Huge flexibility, custom sources
- Easy to use
- Bytebuddy provider will be able to compile your bindings at runtime (You will need to add the cfg4k-bytebuddy to your dependencies.)
For further information, use the wiki
Quick start
- Add the Bintray repository:
repositories {
jcenter()
}
- Add the dependency for the module(s) that you are going to use
compile 'com.jdiazcano.cfg4k:cfg4k-core:$VERSION'
fun main(args: Array<String>) {
val source = ClassPathConfigSource("global.properties") // Create source
val loader = PropertyConfigLoader(source) // Create loader
val provider = ProxyConfigProvider(loader) // Create provider
val databaseConfig = provider.bind<DatabaseConfig>("database") // bind and use
println("Name: ${databaseConfig.name()}")
println("Url: ${databaseConfig.url()}")
println("Port: ${databaseConfig.port()}")
}
/**
* This interface defines a database configuration
*/
interface DatabaseConfig {
/**
* You can have javadocs inside your properties and this is really cool
*/
fun url(): String
fun port(): Int
fun name(): String
// if you have an unused property you know it and you can delete it
val unused: String
@Deprecated("You can even deprecate properties!")
fun deprecated(): Boolean
val youCanuseValuesToo: String
val andNullables: Int?
}
Architeture overview
License
Licensed under the Apache License, Version 2.0. See LICENSE file.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].