I have a running gradle script that builds a Docker image (I use transmode docker plugin but I guess that does not matter for my problem). My gradle script works ok but now I want it to work with minikube so for that I just need to do
eval $(minikube docker-env)
before running the gradle command. This makes "docker" command work with minikube docker, and not the original docker in my Mac.
The problem is that, as I run gradle scripts from eclipse, that "eval $(minikube docker-env)" command needs to be included somehow in the gradle script, as it can't be executed as a bash command prior to gradle execution in Eclipse (no bash anywhere). I have tried adding:
commandLine 'eval','$(/usr/local/bin/minikube docker-env)'
This does not work, probably because "eval" is not really a command, but a shell function that executes the return from command in $() as sub commands.
How can I emulate this so my gradle command includes the eval to configure minikube?