The Church did not declare dogmatically that the Earth was flat, that would also be out of the bounds of what dogma is.
You also don't seem to understand the issue around Galileo on several levels. First, it had nothing to do with the Earth being flat. Columbus had already discovered the new world by that time, putting away any doubts for even the most uneducated person.
Now, to save time and posts, I am going to address the other points you might throw out about Galileo-
Most people think it is over heliocentrism (Earth going around the Sun). This is wrong too- it was already proposed by a devout Catholic canon lawyer named Copernicus a century early and was widely accepted.
A few people know that what made Galileo different was that he proposed that orbits around the Sun were imperfect. This was problematic on a philosophical level. Although this wasn't the philosophical issue, it was Galileo's insistance on new philosophy and theology that caused him problems- particularly the idea that God could be known through math... but most people don't know that history.
Wikipedia (that source of all Truth and Knowledge) apparently doesn't know that history either. I suggest you revise its biography, because as it is, it reads, in part -
Galileo Galilei (Italian pronunciation:
[galiˈlɛo galiˈlɛi]; 15 February 1564
[4] – 8 January 1642)
[1][5] was an Italian
physicist,
mathematician,
astronomer, and
philosopher who played a major role in the
Scientific Revolution. His achievements include improvements to the
telescope and consequent astronomical observations, and support for
Copernicanism. Galileo has been called the "father of modern observational
astronomy,"
[6] the "father of modern
physics,"
[7] the "father of
science,"
[7] and "the Father of Modern Science."
[8] Stephen Hawking says, "Galileo, perhaps more than any other single person, was responsible for the birth of modern science."
[9]
The motion of uniformly accelerated objects, taught in nearly all high school and introductory college physics courses, was studied by Galileo as the subject of
kinematics. His contributions to observational astronomy include the telescopic confirmation of the
phases of Venus, the discovery of the four largest satellites of
Jupiter (named the
Galilean moons in his honour), and the observation and analysis of
sunspots. Galileo also worked in applied science and technology, improving
compass design.
Galileo's championing of Copernicanism was controversial within his lifetime, when a large majority of philosophers and astronomers still subscribed (at least outwardly) to the
geocentric view that the Earth is at the centre of the universe. After 1610, when he began publicly supporting the
heliocentric view, which placed the Sun at the centre of the universe, he met with bitter opposition from some philosophers and clerics, and two of the latter eventually denounced him to the
Roman Inquisition early in 1615. Although he was cleared of any offence at that time, the
Catholic Church nevertheless condemned heliocentrism as "false and contrary to Scripture" in February 1616,
[10] and Galileo was warned to abandon his support for it—which he promised to do. When he later defended his views in his most famous work,
Dialogue Concerning the Two Chief World Systems, published in 1632, he was tried by the Inquisition, found "vehemently suspect of heresy," forced to recant, and spent the rest of his life under house arrest. . . ."
Now, I readily confess my previous error which is a great source of embarrassment to myself. I trust that we can agree to the above Wikipedian statement.