Preheat the oven to 350°F.
Rub all the vegetables lightly with vegetable oil. Place the oiled vegetables in a roasting pan. Place in the oven and roast until the vegetables are brown on the outside and the eggplants are deeply wrinkled, about 2½ hours. Remove the eggplants, onions and garlic and set aside to cool. Increase the oven temperature to 425°F and return the sweet potatoes to the oven. Continue to roast until brown juices are beginning to come out of the potatoes, about 30 minutes.
When cool enough to handle, peel and coarsely chop the eggplants, onions and sweet potatoes. Peel the garlic and mash with a fork. Refrigerate the ingredients separately until ready to use in Sweet Potato Eggplant Gravy.