The tune is the English air, Heart of Oak. These American words were written by John Dickinson and published in 1768. Dickinson was one of the leaders of the American Revolution, a famous lawyer and Governor of Delaware and Pennsylvania.
The music to Heart of Oak was by Dr. William Boyce (1711-1779). The English words were by David Garrick.
Dr Boyce was a songwriter in London, beginning around 1730. In 1757 he reached the peak of his career, being put in charge of the King’s Band of Musick, a position which Purcell held much earlier. He received a doctorate in 1749. In 1758 he was the organist at the Chapel Royal. His first compositions to appear in print were published in 1747. Boyce retired from music due to deafness and retired to Dorset.