China reported better-than-expected economic growth for the second quarter in the face of an ongoing trade war with the United States, as diversification efforts to non-US markets buoyed exports.