LM317 3.7 v battery charger
Be careful charging lithium batteries.  There are lots of safety issues. You need a way to control the current, terminate charge, and monitor battery temperature to do it properly.  If you don't do these things properly there's a real risk of fire or even explosion.  Yes, most lithium batteries can charge with a voltage of 4V, but without carefully following the charging recommendations in the battery datasheet you run the risk of getting in trouble. So to answer your question, no, you should not use your LM317 circuit to charge your lithium batteries.