If you want to be sure to do it correct, put it after the finite verb, because there are sentences where you can't put gern at the end, like:
Ich gehe gern schwimmen
But in sentences with only one verb, both ways are possible. But gern at the end doesn't sound very natural in most cases.