KEnvPlugin

class KEnvPlugin : Plugin<Project>

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

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun apply(project: Project)