KEnv Plugin
KEnv Config Gradle plugin v2.
Provides schema-based, type-safe environment variable management for Kotlin Multiplatform and Android projects. Registers the kenvConfig DSL extension and a kenvGenerate task that orchestrates schema parsing, environment file discovery, validation, and Kotlin code generation using the unified directory convention.
Usage:
plugins {
id("io.github.adventures92.kenv-config")
}
kenvConfig {
directory.set(file("kenv"))
environments.set(listOf("dev", "staging", "production"))
generatedPackageName.set("com.example.config")
// Optional: Android variant mapping
variantMapping {
buildType("debug") uses "dev"
buildType("release") uses "production"
}
}Content copied to clipboard