Sunday, 17 October 2021

Reading system environment variable in gradle

I'm bit curious for learning how can we load private credentials from system environment variables (Windows/Mac/Linux) in Android build.gradle or any other gradle configuration file. There might be ways or approaches through which we can achieve this but really looking for directions.

Couple of things I already explored but didn't work for me are:

Note: I tried on Windows Environment and getting null.

In Gradle, is there a better way to get Environment Variables?

https://javabydeveloper.com/gradle-system-properties-via-command-line-step-by-step-example/

How to give System property to my test via Gradle and -D

https://dzone.com/articles/specifying-gradle-build

https://discuss.gradle.org/t/how-should-i-be-handling-passing-system-properties-from-gradle-to-my-tests/7171/3



from Reading system environment variable in gradle

No comments:

Post a Comment