To avoid OOM exceptions we specify the following in our gradle.properties when running the daemon:
org.gradle.jvmargs=-XX:MaxPermSize=256m -Xms256m -Xmx512m
However when we don't want to run the daemon (f.e. because there's a plugin doing System.console stuff which doesn't work in daemon-style) we should specify --no-daemon or put or.gradle.daemon=false in our gradle.properties.
However when doing either of the above settings a daemon is still forked:
Note: in order to honour the org.gradle.jvmargs and/or org.gradle.java.home values specified for this build, it is necessary to fork a new JVM. This forked JVM is effectively a single-use daemon process. In order to avoid the slowdown associated with this extra process, you might want to consider running Gradle with --daemon.
Basically there's no way to not run gradle as a daemon when there's a org.gradle.jvmargs specified. This is quite annoying.