Adapt examples to API changes. Add Java 6 support. Start adding release Gradle task.