General Motors plans to invest nearly $1 billion in four U.S. plants to support production of components for electric vehicles as well as its next generation of V-8 engines, signaling gas-powered trucks and performance cars are here for the foreseeable future.

The $918 million investment, which GM announced Friday, is despite the automaker’s plans to exclusively offer all-electric consumer vehicles by 2035. It’s the latest example of legacy automakers such as GM having to balance their current lineup of vehicles with emerging EVs.

“Our commitment is to an all-EV future, no doubt about it,” Gerald Johnson, global head of GM’s manufacturing, told reporters after the announcement. “We know that has a horizon and between here and there, there are a lot of internal combustion engine customers that we don’t want to lose.”

A majority of the investment — $579 million — will go toward preparing GM’s Flint Engine Operations plant in Michigan for the automaker’s sixth-generation family of small-block V-8 gas engines.

The engines are used in some of the automaker’s most highly profitable products, such as its full-size pickup trucks and SUVs. They’ve also been used in some Cadillac and Chevrolet performance cars.