Skip to content

Instantly share code, notes, and snippets.

@yshrsmz
Last active February 1, 2019 02:13
Show Gist options
  • Save yshrsmz/733a44f9a9779f68b4b14fbfdc4a1ad1 to your computer and use it in GitHub Desktop.
Save yshrsmz/733a44f9a9779f68b4b14fbfdc4a1ad1 to your computer and use it in GitHub Desktop.
plugins {
id 'kotlin-multiplatform'
id 'com.codingfeline.buildkonfig'
}
buildkonfig {
packageName = "com.codingfeline.githubdata"
defaultConfigs {
buildConfigField 'STRING', 'GITHUB_TOKEN', 'hogehoge'
}
}
// androidMain/BuildKonfig.kt
package com.codingfeline.githubdata
import kotlin.String
actual object BuildKonfig {
actual val GITHUB_TOKEN: String = "hogehoge"
}
// commonMain/BuildKonfig.kt
package com.codingfeline.githubdata
import kotlin.String
expect object BuildKonfig {
val GITHUB_TOKEN: String
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment