China is India's major foe now, eclipsing Pakistan. Pakistan is much smaller and so designing a military to cope with them wasn't a strain. China is another matter:
Modi’s ruling party is making his record on national security a key part of its campaign in an election that will conclude on May 23, with boasts of airstrikes against Pakistan and more than 80 trips abroad to cement India’s reputation as a rising economic power. His government refused to attend Chinese President Xi Jinping’s Belt and Road infrastructure forum that kicked off Friday.
Yet for all that, India has only fallen further behind China over the past five years. Beijing has continued to outspend India on defense, implemented sweeping reforms in its military and diplomatic structures, and built strategic infrastructure in India’s backyard -- not to mention providing arch-rival Pakistan with defense technology.
In the long run, the head of the National Security College at the Australian National University thinks that India's economy will get closer to China's and provide India with the world's third largest defense budget.
The factors that will help America against China's rise will help India, too.
Friendship with America, Taiwan, Japan, Australia, and Vietnam in particular will help bridge the gap with China. Russia would be a big prize and ending the pointless hostility of Pakistan would be a big deal, too.
And American-Indian friendship helps us, too, of course, by compelling China to focus more resources inland rather than out to see where our allies on the western Pacific rim lie.
UPDATE: The latest edition of the Pentagon's report on Chinese military power notes a grave danger to India:
During this period [from 2020 to 2035], China sees itself as growing its economic and technological strength “by leaps and bounds,” strengthening rule of law, growing the middle class, and improving living standards while addressing income disparity. [emphasis added]
Corruption is a major factor impeding India's ability to compete with China.
[Note that I removed an update that addressed the China-Philippines Pagasa Island dispute. I'm not sure why I added that here.]