EnvFile icon indicating copy to clipboard operation
EnvFile copied to clipboard

In IntelliJ 2020.2 Experimental features checkbox is greyed out

Open charlesritchea opened this issue 5 years ago • 3 comments

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.

charlesritchea avatar Jul 30 '20 22:07 charlesritchea

How Do I Load .env in gradle?

liudongcxw avatar Aug 04 '20 03:08 liudongcxw

@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
        }
    }

charlesritchea avatar Aug 06 '20 16:08 charlesritchea

Still relevant?

ashald avatar Nov 22 '22 05:11 ashald