google / secrets-gradle-plugin

A Gradle plugin for providing your secrets to your Android project.
Apache License 2.0
1.13k stars 99 forks source link

How do I access secrets in build.gradle? #66

Open distinctdan opened 1 year ago

distinctdan commented 1 year ago

I need to access secrets in my app build.gradle, but I'm not seeing any documentation on how to do it. Specifically, I want to default my signing keystore to use an environment variable if present for github actions, but then fallback to using a local secrets file. It seems like this would probably be supported, is there a way to do this?

I'm trying this, but this doesn't work:

    signingConfigs {
        release {
            storePassword System.getenv("MY_RELEASE_KEYSTORE_PASSWORD") ?: project.findProperty('MyReleaseKeystorePassword')
        }
    }
aleksamarkoni commented 6 months ago

Any updates on this topic, it's been almost 6 months.