diff --git a/app/build.gradle b/app/build.gradle index 04e587a..233df83 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,4 +1,5 @@ apply plugin: 'com.android.application' +apply plugin: 'checkstyle' android { compileSdkVersion 27 @@ -24,6 +25,20 @@ android { } } +task checkstyle(type: Checkstyle) { + configFile = rootProject.file('config/checkstyle/checkstyle.xml') + + source 'src/main/java' + include '**/*.java' + exclude '**/gen/**' + + classpath = files() +} + +checkstyle { + toolVersion = '8.17' +} + dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:27.1.1' diff --git a/build.gradle b/build.gradle index e0a5a3d..51a8a52 100644 --- a/build.gradle +++ b/build.gradle @@ -29,13 +29,6 @@ allprojects { url 'https://igniterealtime.org/repo/' } } - - apply plugin: 'checkstyle' - - checkstyle { - configFile = new File(rootConfigDir, 'checkstyle.xml') - toolVersion = '8.10' - } } task clean(type: Delete) { diff --git a/config/checkstyle.xml b/config/checkstyle/checkstyle.xml similarity index 100% rename from config/checkstyle.xml rename to config/checkstyle/checkstyle.xml