How did British rule contribute to the development of Indian nationalism?

How did British rule contribute to the development of Indian nationalism?