EnvFile
EnvFile copied to clipboard
In IntelliJ 2020.2 Experimental features checkbox is greyed out
I was using EnvFile experimental features when running tests with Gradle Test Runner, and just like the description says, it broke at anytime :) I know I need to just load the .env file in gradle and problem solved, but wanted to let you know.
How Do I Load .env in gradle?
@liudongcxw in a task:
doFirst() {
def props = new Properties()
file(".env").withInputStream { props.load(it) }
props.each { String key, String val ->
System.setProperty(key, val)
environment key, val
}
}
Still relevant?