Skip to content

Commit

Permalink
[Oztechan/CCC#1717] Remove dependency updates library
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafaozhan committed Jan 16, 2023
1 parent 5477213 commit d7b5dac
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,24 @@ allprojects {
val isReleaseBuild: Boolean
get() = System.getenv("GPG_KEY") != null

fun getSecret(
key: String,
default: String = "secret" // these values can not be public
): String = System.getenv(key).let {
if (it.isNullOrEmpty()) {
getSecretProperties()?.get(key)?.toString() ?: default
} else {
it
}
}

fun getSecretProperties() = try {
Properties().apply { load(file("key.properties").inputStream()) }
} catch (e: IOException) {
logger.debug(e.message, e)
null
}

object Library {
const val GROUP = "com.github.submob"
const val URL = "https://github.com/SubMob/ParserMob"
Expand Down

0 comments on commit d7b5dac

Please sign in to comment.