Using a pestle & mortar crush the rosemary leaves, juniper berries, salt and garlic, then add the butter and sugar. Mix to a coarse paste.
Using a knife make lots of small incisions all over the meat. Rub the meat with the butter paste, push some with your finger into the slits. Rest for half an hour, or longer if you can.
Preheat the oven to 200°C.
Cut the onions into thick slices, line a roasting tray with them. Place the lamb on the top then put in the oven for 20 minutes.
After 20 minutes of roasting, turn the temperature down to 180°C.
Roast for about 1 hour, depending on how well done you like lamb.
Remove the lamb from the oven and transfer to a plate. Cover well to keep warm and rested for 20-30 minutes.
Meanwhile make the gravy:
Add the stock to the onions and heat it to boiling point, whilst stirring and scraping the bits from the base of the tin with a wooden spoon. Transfer the sauce into a saucepan through a sieve. Add the jam and the gin, and reduce it to a thick, smooth sauce.
Cut the meat and serve with the gravy.