Well,
most of the New Testament (at least the Gospels, Acts, and Pauline epistles) was settled some time in the first or second century (see, for example, the
Muratorian Canon, from around 180).
Some of the smaller epistles were at first not circulated to the whole Christian world, however. And for some books there was debate as to whether they were "Apostolic." The ancient
Codex Sinaiticus contains two books (the
Shepherd of Hermas and the
Epistle of Barnabas) that were later declared non-canonical.
The
exact New Testament list we have was first articulated by Athanasius in 367 (i.e. before the Vulgate).
The decision had nothing to do with the Divine Liturgy, as far as I know. Rather, the end of persecution and the formation of a Christian empire under Constantine led to the need for consistency between the Scriptures used in different cities, in the same way that the Council of Nicea discussed consistency in theology and in issues of worship (such as whether prayer should be done kneeling or standing).