The New York Yankees have agreed to a contract with Gio Gonzalez.

It's a minor league deal, but if Gonzalez is added to the Major League roster the deal will be worth $3 million for the season, plus incentives, according to a source.

The deal allows Gonzalez to opt out April 20 if he hasn't been added to the Major League roster.

"It gives him an opportunity to come to camp and compete in front of us and others," Brian Cashman said.