yshrsmz/BuildKonfig — reverse-engineered prompt
Reverse engineered prompt
Build me a Kotlin plugin for multiplatform and JVM projects that gives me a simple BuildConfig style object from values I set in Gradle. I want to define shared config once, like app name, API base URL, feature flags, and then use those values from common code without wiring Android and iOS separately.
It should let me set a required package name, optionally rename the generated object, and optionally expose a public version. I need default values for everything, plus the ability to override specific values per target like Android or iOS. Please support normal string values, nullable values, and constants where that makes sense. If target specific configs exist, generate the right common and platform specific code so shared code still works.
Include a working sample project, one simple example and one with target overrides, and make sure generation runs automatically during compile with a task I can also run manually. Please add clear README docs and tests so it feels production ready. If anything is unclear, check the current Kotlin and Gradle docs online.
Want more depth? Deep Reverse