God keeps his promises regardless of what we do, but the positive promises might be fulfilled in our lifetime or in another's, depending on our relationship with God. If the people as a whole are obedient to God's Law, or even if only their leaders are, the people are much more likely to receive God's blessing in their lifetimes.
1 Kings 6:12-13