The Yankees’ offense of late has resembled John Kasich’s bid for the Republican nomination: plenty of daily verbiage about a momentum swing on the near horizon, then a vastly different result when it’s time to keep score.

It occurred again Thursday night for the Yankees, who mostly were shut down during Rich Hill’s six innings in a 7-3 loss at the Stadium that completed a three-game Oakland sweep.

“It’s definitely frustrating to get swept at home,’’ said Alex Rod riguez, who went 0-for-2 with two walks and is in a 4-for-31 slide. “It’s something we’re not used to and obviously we’re not going to accept. We’re going to get better, and that should start [Friday night].’’

$relatedItem.embed_code.value

Perhaps, but the odds are not in his club’s favor against the pitching-rich Rays, who start a three-game series at the Stadium.

advertisement | advertise on newsday

The Yankees (5-9), who had eight hits and struck out 14 times — 10 against Hill — have lost three straight and seven of their last eight. They have scored 18 runs in the eight games.

“We’re 5-9 and I just told somebody I’d rather lose nine of 14 in April than in September,” said Brett Gardner, who drew a pinch-hit walk and scored a run in the seventh as the Yankees got within 4-3. “I know everybody gets frustrated when we don’t play well, but I don’t think anybody gets more frustrated than the players. We obviously have high expectations for ourselves, and right now we’re not playing well . . . Any time things aren’t going well, you press a little bit.”

Chasen Shreve took over for Luis Severino (two runs and seven hits allowed in six innings) to begin the seventh with the score 2-2. Two pitches later, it was 4-2.

The first was a 91-mph fastball that Khris Davis hammered to center for his first homer of the season. The next was a 92-mph fastball that Coco Crisp sent into the second deck in leftfield for his second home run.

“That’s what frustrated me about it,” said Shreve, who had not allowed a run in his first six games. “We’ve been struggling and I want to go out there and put up a zero, especially in this situation, and it just didn’t happen.”

Yankees videos

Johnny Barbato allowed a two-out, two-run homer by Chris Coghlan in the eighth to make it 6-3. Mark Canha, who had hit a two-out homer off Severino to tie it at 2-2 in the fifth, added a sacrifice fly off Kirby Yates in the ninth.

“We’re all going to click eventually,” Barbato said of the offense. “We’re going to be dangerous when that happens.”

A Yankees team that came in 4-for-its-last-58 with runners in scoring position performed better Thursday night, but only in comparison with that previous hideousness, going 3-for-11. The Yankees left nine on base. Their two runs before the seventh came courtesy of Aaron Hicks’ bloop RBI single in the second and a 45-foot dribbler by Austin Romine that went for a two-out RBI single in the fourth.

Hill, a Yankee in 2014, gifted the Yankees a run in the second. He started by walking Mark Teixeira (now 3-for-35) on four pitches and walking Rodriguez on seven pitches. Chase Headley ripped a liner back up the middle that Hill got a glove on, which allowed Jed Lowrie to complete a 1-4-3 putout that gave the Yankees runners at second and third. Hicks, off to a 1-for-20 start, looped a single to center to make it 1-0. That made the Yankees 1-for-2 with RISP, an indication of a breakout, Joe Girardi hoped, but that never happened.

“It’s just kind of the way it’s going right now,” he said. “We get the hits with the runners on today, but it’s not enough.”