Preheat the oven to 350 degrees F. Line a muffin tin with liners.
In a small bowl, whisk together the flour, baking powder, spices and salt. Set it aside.
Add the butter to the bowl of an electric mixer and beat it until creamy. Add the sugar and beat with the butter on high speed until fluffy, 2 to 3 minutes. Add in the eggs one at a time, mixing well on medium speed until combined. Scrape down the sides of the bowl if needed. Add in the oil and vanilla extract, beating on medium speed for another minute. With the mixer on low speed, add in half of the dry ingredients. Pour in the milk. Add in the other half of the dry ingredients and mix them on medium speed until the batter is combined.
Fill the cupcake liners about 3/4 of the way full. Bake until the tops are set, about 16 to 17 minutes. Let cool completely before frosting.