The Buffalo Bills have traded wide receiver Sammy Watkins and a sixth-round pick in next year’s draft to the Los Angeles Rams for cornerback E.J. Gaines and a 2018 second-round pick, the Bills announced Friday.

Also Friday, the Bills acquired wide receiver Jordan Matthews and a 2018 third-round pick from the Philadelphia Eagles for cornerback Ronald Darby.

The Bills’ decision to trade their top receiver and top cornerback for future draft picks signals that first-year general manager Brandon Beane and coach Sean McDermott view the team as a long-term rebuilding project.

Watkins’ departure strips quarterback Tyrod Taylor of his top passing target this season. Taylor took a $10 million pay cut during the offseason to remain with the Bills, but his future with the team remains in doubt. The Bills can release Taylor before paying him a $6 million roster bonus in March and save most of his $18 million cap number in 2018, the final year of his contract.

“It doesn’t say anything,” said Beane about what the trade means for Taylor. “Everybody’s forgetting? Anquan [Boldin]?last week. This is not a throw-in-the-towel thing at all. Somebody mentioned that somebody said that out there, and honestly, that’s annoying to me. You don’t know me if you think I’m throwing in the towel. When I go out there and play pingpong, whatever I’m doing, I’m not throwing in the towel. If we’re throwing in the towel, we’re not trying to get a starting receiver back.

“To your question on Tyrod, it’s nothing. We got Anquan, who we added. I told you, I honestly believe he’s a Hall of Famer. He still can play in this league. Jordan Matthews is a starting receiver. If you look at his numbers and what he’s done, those aren’t anything to laugh at. So Tyrod will get every opportunity to lead this team, and we’re all rooting for him. It’s our best interest.”

Darby, who finished second in voting for Defensive Rookie of the Year in 2015, had two years remaining on his contract. White now projects as the Bills’ top cornerback this season with Gaines likely to start opposite him.

The Rams have been searching all year for an outside vertical threat to complement new coach Sean McVay’s offense and finally have that player in Watkins, who joins former Bills teammate Robert Woods?in the Rams’ wide receiver corps.

The Rams had been talking to the Bills about a deal like this dating back to early May, when Buffalo declined its fifth-year option on Watkins’ contract.

Rams general manager Les Snead called Watkins a “complementary piece,” though he figures to be much more than that.

“When you attack a team with your pass game, you’d like to use the width of the field and the length of the field, and that’s what speed can do,” Snead said at the team’s annual charity luncheon in downtown Los Angeles. “It’s really just trying to open the field up.”

Watkins can play a role similar to the one DeSean Jackson played in Washington the past three years for McVay, who was the Redskins’ offensive coordinator. Watkins joins Woods and slot receiver Cooper Kupp in three-receiver sets, putting Tavon Austin’s role on the team in serious question.

The Rams had hoped that the 5-foot-8 Austin could develop into more of a vertical threat in this offense, but he spent the offseason recovering from wrist surgery and had been held out of training camp because of a hamstring injury. The Rams’ other vertical threat, Mike Thomas, is suspended the first four games of the regular season for violating the NFL’s policy on performance-enhancing substances, and their other receiver, Josh Reynolds, is a rookie who is still developing.

Snead said Austin “definitely has a place.”

“Tavon is a fast kid,” Snead said. “Jimmy Johnson probably said it best, long before I was in football — speed is important.”

Watkins enters the 2017 season on the final year of his contract after the Bills declined his fifth-year option earlier this offseason. Snead “definitely” wants to figure something out with Watkins long term but hasn’t yet broached that topic with his representatives.

“He’s 24,” Snead said. “So, you don’t just do it for the now — although we do think he’ll help the now. But because of the age, you’d want it to be for the future, as well.”

Gaines seemingly entered training camp in competition with newcomer Kayvon Webster for the No. 2 cornerback job, alongside Trumaine Johnson. But Webster’s familiarity with Rams defensive coordinator Wade Phillips’ system — playing on Phillips’ Denver Broncos defenses the past two years — gave him an advantage and ultimately won him the job.

Matthews has been a highly productive player since being selected 42nd overall in 2014. He ranks first in receptions (225) and third in receiving yards (2,673) among Eagles in their first three years and is one of only five players in NFL history with 65-plus receptions and 800-plus receiving yards in each of their first three seasons, joining a club that includes Randy Moss, Odell Beckham Jr., Mike Evans and A.J. Green.

Despite the production, the Eagles never got serious about working out a contract extension with Matthews, who is in the final year of his rookie deal. Executive vice president of football operations Howie Roseman has a history of re-upping homegrown players early if they have been identified as part of the core. It was telling that he chose not to aggressively pursue a new contract with Matthews.

Part of the issue is that Matthews’ value is difficult to gauge. His numbers suggest he’s deserving of something in the range of Kenny Stills (four years, $32 million) or Austin (four years, $42 million). The counter would be that Matthews is a slot receiver — not an exceptionally explosive one relative to some others out there — and paying big money for a player who might end up being the team’s third receiving option doesn’t make sense, especially if the Eagles want to extend Alshon Jeffery beyond this year.

There is also a knee injury to consider. Matthews has struggled to get right since sustaining what was described as a bone bruise last August on a low hit during training camp. One ailment after the next has crept up in the months since. He is currently dealing with knee tendinitis, which kept him from practicing for a good portion of the spring. A recent report suggested some team employees believe Matthews could have practiced more but allowed his contract status to influence his decision-making, a charge that Matthews strongly denied.

Nelson Agholor enjoyed a strong spring manning the slot in Matthews’ absence. The Eagles are also high on rookie Mack Hollins and second-year player Marcus Johnson. The departure of Matthews will make it easier for the front office to keep some of the promising young talent on the 53-man roster.

Just as importantly, the trade brings some much-needed talent to a suspect cornerback group. Patrick Robinson and Jalen Mills sat atop the depth chart before the deal, with Ron Brooks as the favorite to man the slot. (Brooks, coming off a ruptured quad tendon, injured his hamstring Thursday in the preseason opener against the Green Bay Packers.) Inconsistency has plagued the group during the spring and summer, and defensive coordinator Jim Schwartz has made it quite clear that the competition is far from settled.

“I’d love to have some continuity there. But we also have to let it play,” he said.