This message was deleted.
# community-support
s
This message was deleted.
t
You can get them from the settings using
val foo: String by settings
or its "extras" with
extra["foo"]
(assuming Kotlin DSL here, with Groovy DSL I think you can just use
settings.foo
). But you may want to prefer
credentials(PasswordCredentials::class)
after naming your repository: https://docs.gradle.org/current/userguide/declaring_repositories.html#sec:handling_credentials
👍 1
thank you 1
s
Yeah both
extra["FOO"] as String
val foo: String by settings
Seem to work. Trick being that you need to be explicitly casting it to a String, which should be safe anyway. Interesting, didn’t know about the PasswordCredentials, seems a bit more magic there, like it expects the keys to read exactly
{name}
plus `Password`|`Username` suffixes. Meaning the key can not be
SOME_THING_PASSWORD
but would need to be
SOME_THINGPassword
or maybe even
someThingPassword
. Not the end of the world I guess.
Would just look odd in my Github Secrets next to everything else which is capitalized snake case