In a large bowl, combine 2 cups flour, yeast, sugar and salt. Add spices, garlic, rosemary, onion, and cranberries and stir to combine. Make a well in the center and pour in the olive oil and warm water. Stir until combined. Stir in just enough remaining flour to form soft dough.