Fixed TextPainterExample to be runnable via Gradle.