Skip to content

Instantly share code, notes, and snippets.

@luongvo
Forked from danielgomezrico/cp-env-to-properties.sh
Created January 3, 2018 07:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luongvo/93ab6c58e02d639395e9f21bbf49c83e to your computer and use it in GitHub Desktop.
Save luongvo/93ab6c58e02d639395e9f21bbf49c83e to your computer and use it in GitHub Desktop.
Gradle / Bash - copy all env variables to app/gradle.properties (used to copy secret env vars from travis or circle CI to build android projects)
#!/usr/bin/env bash
#
# Copy env variables to app module gradle properties file
#
set +x // dont print the next lines on run script
printenv | tr ' ' '\n' > app/gradle.properties
set -x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment