Boys are so confusing help!!!!!!!!

So I’ve been speaking to a guy and its nearly been a year however whenever I’m out with my friends and he’s with his, he goes really awkward and shy with me and always speaks to everyone else but me. I’m just so confused like I feel like I’m doing something wrong please tell me why he’s like this. We are in the same school year and we share all our friends so it’s really weird when he’s being friendly to everyone we are out with but doesn’t even notice me