An Oregon homebuilder agreed to a settlement with the state attorney general following allegations that it illegally forced buyers to donate to a nonprofit.