Walgreens Boots Alliance Inc agreed to pay $105 million to settle a long-running class-action lawsuit accusing it of misleading shareholders about how rising generic drug prices and reimbursement pressures would hurt its pharmacy business.