Enable checkstyle

Change-Id: Ib1944d6aad665656d8a99d6663f8dca31aaf916e
diff --git a/build.gradle b/build.gradle
index a827935..dc1803f 100644
--- a/build.gradle
+++ b/build.gradle
@@ -2,7 +2,7 @@
   id 'java-library'
   id 'maven' // TODO: migrate to 'maven-publish'
   id 'signing'
-  //id 'checkstyle'
+  id 'checkstyle'
   id 'org.sonarqube' version '3.0'
   id 'net.saliman.cobertura' version '4.0.0'
 }
@@ -50,11 +50,11 @@
   }
 }
 
-tasks.withType(Checkstyle) {
-  checkstyleClasspath = project.configurations.checkstyleConfig
-  checkstyleTest {
-    configFile file('config/checkstyle/checkstyle-test.xml')
-  }
+checkstyle {
+  toolVersion '8.23'
+}
+checkstyleTest {
+  configFile file('config/checkstyle/checkstyle-test.xml')
 }
 
 cobertura {