In a medium saucepan, combine the pineapple juice and granulated sugar over medium heat. Stir until the sugar is dissolved.
Add the sweetened condensed milk and butter to the saucepan. Continue to cook, stirring frequently, until the mixture thickens and begins to pull away from the sides of the pan, about 10-15 minutes.
Remove the saucepan from the heat and stir in the desiccated coconut until fully combined. The mixture should be thick and sticky.
Pour the mixture into a lightly greased or parchment-lined 8x8 inch (20x20 cm) baking dish. Press it down evenly with the back of a spoon or spatula.
Let the mixture cool to room temperature, then refrigerate until firm, about 1-2 hours.
Once firm, cut the pineapple mixture into small squares or rectangles, about 1 inch (2.5 cm) in size.
Melt the chopped chocolate and coconut oil (if using) in a heatproof bowl over a pot of simmering water (double boiler) or in the microwave in 30-second intervals, stirring until smooth.
Dip each pineapple lump into the melted chocolate, ensuring it is fully coated. Place the coated lumps on a baking sheet lined with parchment paper.
Refrigerate the coated lumps until the chocolate is set, about 30 minutes.
Enjoy your homemade Pineapple Lumps as a delicious treat or gift!
Enjoy your meal!