Slice onions. Heat oil in a deep non stick pan and add cinnamon, cloves, green cardamoms, star anise, curry leaves and onions and sauté till golden.
Grind red chillies, garlic, ginger with 2 tbsps water to a fine paste. Slit green chillies and add to the pan and continue to sauté. Add chicken and salt and sauté for 2-3 minutes.
Add ground paste and mix well. Drain rice and add along with coconut milk, chicken stock and cook on high heat. When the mixture begins to boil, reduce heat and add juice of 1 lemon.
Mix well, cover and cook till both the rice and chicken are done. Take the pan off the heat and let it stand, covered, till it is time to serve. Serve hot.