Gradle plugin for providing build-time configuration properties
Published by LimeBeck 5 months ago
Published by LimeBeck 6 months ago
Published by LimeBeck 11 months ago
Change KClass-based types in delegates to regular KType from return property, update kotlin to 1.9.20, gradle to 8.4
Full Changelog: https://github.com/LimeBeck/build-time-config/compare/V2.1.0...V2.2.0
Published by LimeBeck 12 months ago
Add possibility to specify null values on config properties:
build.gradle.kts
:
plugins {
kotlin("jvm") version "1.8.0"
id("dev.limebeck.build-time-config") version "2.1.0"
}
...
buildTimeConfig {
config {
packageName.set("dev.limebeck.config")
objectName.set("MyConfig")
destination.set(project.buildDir)
configProperties {
val someProp: String by string("SomeValue")
val somePropNullable: String? by string(null)
val somePropNullableFilled: String? by string("null")
val someProp2 by number(123)
val someProp3 by number(123.0)
val someProp4 by number(123L)
val someProp5 by bool(true) //also can be boolean(true)
val nested by obj {
val someProp by string("SomeValue")
}
}
}
}
Published by LimeBeck about 1 year ago
New extendable delegates-based API
Now you can describe build time config like this:
plugins {
kotlin("jvm") version "1.8.0"
id("dev.limebeck.build-time-config") version "2.0.0"
}
...
buildTimeConfig {
config {
packageName.set("dev.limebeck.config")
objectName.set("MyConfig")
destination.set(project.buildDir)
configProperties {
val someProp by string("SomeValue")
val someProp2 by number(123)
val someProp3 by number(123.0)
val someProp4 by number(123L)
val someProp5 by bool(true) //also can be boolean(true)
val nested by obj {
val someProp by string("SomeValue")
}
}
}
}