this is a pretty simple task that i’m having troub...
# gradle
g
this is a pretty simple task that i’m having trouble finding an answer for, but is there a way to set an environment variable for all tasks from the gradle build file? it looks like the `JavaExec`type task allows for it by providing a
setEnvironment
method, however i want it to be available for all of my
jsBrowser..
type tasks. so in summary i want to: 1. get a value from the properties file — this is easy 2. set that as an env variable from the gradle.build.kts file so that its available to all tasks any help will be greatly appreciated!
I solved this by setting a variable in the build file and then using the
setEnvironment
method in
JavaExec
and then using the
args
array for
KotlinWebpack
task. It doesn't put it in the environment for all tasks but it solved my immediate problem