yshrsmz / BuildKonfig

BuildConfig for Kotlin Multiplatform Project
Apache License 2.0
782 stars 32 forks source link

Generated BuildKonfig not updated #45

Closed ernestkamara closed 3 years ago

ernestkamara commented 3 years ago

Hi,

I'm trying to setup BuildKonfig in our app, but the generated file is not being updated running the generator command. Below is my setup and would be kind to know if my setup is wrong. Thanks in advance.

// build.gradle.ktx
...
buildkonfig {
    packageName = "com.foo.bar"

    // default config is required
    defaultConfigs {
        buildConfigField(Type.STRING, "OAUTH_CLIENT_ID", "")
        buildConfigField(Type.STRING, "OAUTH_CLIENT_SECRET", "")
    }
}
# gradle.properties
OAUTH_CLIENT_ID=foo
OAUTH_CLIENT_SECRET=bar
// Generated file

import kotlin.String

internal object BuildKonfig {
  val OAUTH_CLIENT_ID: String = ""

  val OAUTH_CLIENT_SECRET: String = ""
}
ernestkamara commented 3 years ago

Sorry, I got it working.