Remember there is no AOO for casting a spell while next to a enemy, so you could move up to the enemy and cast Green Flame Blade and then attack with a weapon without provoking an AOO, unless they have the Mage Slayer feat. Though casting a ranged spell attack spell while engaged causes disadvantage on your roll.
As Jaelis said the answer to your question is yes.