Set maxHeapSize property of test task of specific sub-project of specific root project by editing ~/.gradle/

I am a newbie. I tried looking for solutions in the forum, in the docs, on stackoverflow, using google, etc. and could not find a solution. I hope I am not asking a duplicate question. Please forgive me if I am.

I am using Gradle 4.10.2. I have a sub-project inside a root project. I will not and cannot modify, edit, add, or remove any files in the directories of the sub-project or root project. How do I set of the value of the maxHeapSize property of the test task of the sub-project by editing my ~/.gradle/ ? I realize this is not an ideal approach. Please forgive me for asking such a stupid question.