I Chronicles - Chapter 22
Psst! Solomon! I Got Something to Show You!
David designated the threshing floor as the site of the future Temple; he likewise instructed that the altar he had erected there was the one the people should use for their offerings. David conscripted "resident aliens" (possibly referring specifically to the Gibeonites) to help in the preparations for construction and he enlisted masons to prepare stone. He gathered iron for nails, copper, and lumber. David reasoned that Solomon, who would actually build the Temple, was very young. Since the Temple was to be great, David would stockpile materials for it before his death.
David called Solomon and told him how he had requested to build a Temple to G-d but been refused because he had been a warrior. (There are a variety of explanations for why this is. The simplest is that it is because the Temple is meant to be a place of mercy and David's military background went counter to that. One Midrash goes counter to what most people would assume by saying that David's wars were so holy that a Temple built by him could never be destroyed. That sounds like a good thing, except that then G-d would have to take His entire wrath out on the people, rather than on a building.) David continued by telling Solomon how G-d foretold his birth and how he would build the Temple. Solomon's reign would be a time of peace and his dynasty would endure forever. David prayed that G-d grant Solomon the wisdom to rule the nation well and to keep His laws. (We later see exactly how wise G-d made Solomon!)
David showed Solomon all the gold, silver, copper and other materials he had collected to be used in building the Temple. He told Solomon about the masons and craftsmen he would have to engage for the task. David charged his son with this awesome responsibility and he commanded his officers to assist Solomon with it when the time came.