build-time-config

Gradle plugin for providing build-time configuration properties

Stars
4
build-time-config - V2.3.1 Latest Release

Published by LimeBeck 4 months ago

  • Update kotlinpoet.
  • Fix tests (shame on me)
build-time-config - V2.3.0

Published by LimeBeck 5 months ago

V2.3.0

  • Update the regeneration of generated files upon Gradle configuration update (Gradle Sync).
  • Fix the behavior of nested configuration objects (unfortunately, Kotlin Poet does not allow this to be done in simple way, so - interfaces).
  • Update Kotlin and Kotlin Poet versions. Add a Gradle project example.
build-time-config - V2.2.1

Published by LimeBeck 6 months ago

  • Fix applying to JVM projects (test run requires project clean)
  • Add possibility to define sourceset manually
build-time-config - V2.2.0

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

build-time-config - V2.1.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")
            }
        }
    }
}
build-time-config - V2.0.0

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")
            }
        }
    }
}