Okay, I'm a guy, and I have some advice for you, and this is really true if you are young:
If you are becoming friends with a guy and don't want him to make an advance towards you, ALWAYS state up front, before you continue your friendship, that you positively do not see this guy in any romantic or sexual way, and tell him that you never want him, ever, under any circumstances, to make an advance towards you, and if he can be okay with that, then and only then can the friendship can continue, just friends, study partners, platonic, that sort of thing, because....
if you don't, a lot of guys will take your friendliness as a signal that it's okay to make a sexual advance, and gentlemen will ask for a date before they make an advance, but not a lot of guys are gentlemen, if you haven't already noticed.
Now, if he does it anyway after all that, then you must end your friendship with him, he's one of those guys that doesn't understand "NO".
I'm pretty shy, and I would never do that, I would ask for a date, (even if I weren't shy, I would still ask for a date and continue to day at least two or three before making an advance, like a kiss ) but a lot of guys are more aggressive than I am.
Good luck.
OL