Sync ch18 source with ch14 and fix Maven/Gradle single builds.
Sync ch18 source with ch14 and fix issues.