They then walked the short distance to the dairy, attracting the attention of a local probation officer as they entered the shop.
The younger boy allegedly presented the rifle at the shopkeeper and demanded money, stuffing sweets into his pockets as he did so.
The probation officer saw the boys fleeing and called the police, who found them at the Matthews Ave address. There police were allegedly abused by the other young people, who locked the doors and windows. Entry was forced and the two alleged offenders were found, along with the rifle and the clothes they had been wearing.
They did not go quietly, however, the 12-year-old allegedly spitting at a police officer, punching him in the face twice and kicking him in the mouth.
Police suspected that the boys may have been under the influence of methamphetamine.
The dairy was closed yesterday morning while the victims were speaking to police and a scene of crime officer was collecting evidence.
Inquiries are also being made into how the boy came to have a firearm.