'set environment variable with gradle from file .env

I would like from an .env file of the form:

ENV_NAME=VALUE,
ENV_NAME1=VALUE1

load these variables into environment variable from build.gradle

Then i can find the value of these variables with System.getenv(String) in java.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source