If we want to clean, build and then run our application, we use ./gradlew clean run.
run is part of the Gradle Application plugin.
What we want to achieve is to assign a certain maximum heap size to the application using run, something similar to ./gradlew clean run -Xmx1G.
The result should equal running java -Xmx16G -jar /path/to/my/app.jar.
Is there a way to achieve this?
Edit: Just to make sure, I do not want to increase the build deamons's max heap but the max heap of the application that gets started by gradle.
applicationDefaultJvmArgson the command line like./gradlew clean run applicationDefaultJvmArgs=["-Xmx1G"]?