I've spent my time which is worthless... For you.
Android studio by default uses Kotlin DSL instead of Grovy DSL
The Kotlin DSL for Gradle uses val and var instead of def, and the syntax is slightly different.
To proper configure env variable from local.properties we need to do the folowing.
- Inport this in build.gradle.kts