Preheat oven to 350°F. Grease and flour a 9-inch round or square cake pan (or line with parchment for easy removal).
In a medium bowl, whisk together flour, baking powder, baking soda, salt, cinnamon, ginger, nutmeg, and cloves.
2 cups all-purpose flour, 1 teaspoon baking powder, ½ teaspoon baking soda, ½ teaspoon kosher salt, 2 teaspoons ground cinnamon, ½ teaspoon ground ginger, ¼ teaspoon ground nutmeg, ¼ teaspoon ground cloves
In a large bowl, whisk the granulated sugar, brown sugar, oil, eggs, and vanilla until smooth and combined.
¾ cup granulated sugar, ¾ cup light brown sugar, ¾ cup neutral oil, 3 large eggs, 1 teaspoon vanilla extract
Stir in half of the dry ingredients, then add the buttermilk. Mix in the remaining dry ingredients just until combined -- do not overmix.
½ cup buttermilk
Fold in the diced apples and nuts, if using.
2 cups peeled, ½ cup chopped toasted pecans or walnuts
Pour the batter into the prepared pan and smooth the top.
Bake for 40–45 minutes, or until a toothpick inserted in the center comes out clean with a few moist crumbs attached.
Cool in the pan for 15 minutes before turning out onto a wire rack. Cool completely before dusting with powdered sugar or drizzling with glaze.