From b7301ca3600cee93d25a81c07740812a42eaeff4 Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Tue, 24 Sep 2019 11:12:35 +0200 Subject: [PATCH] Added checkstyle --- .circleci/config.yml | 16 ++++++++++++++++ build.gradle | 11 +++++++++++ config/checkstyle/checkstyle.xml | 28 ++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 config/checkstyle/checkstyle.xml diff --git a/.circleci/config.yml b/.circleci/config.yml index fccd6d8cb..a4db1befd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -51,9 +51,25 @@ jobs: - ~/android key: v1-android-{{ checksum "build.gradle" }} + checkstyle: + docker: + - image: circleci/android:api-28 + working_directory: ~/AntennaPod + + steps: + - checkout + + - run: + name: Checkstyle + command: ./gradlew checkstyle + workflows: version: 2 test: jobs: - test + + checkstyle: + jobs: + - checkstyle diff --git a/build.gradle b/build.gradle index 2ca680ccb..1a00c2e65 100644 --- a/build.gradle +++ b/build.gradle @@ -82,3 +82,14 @@ wrapper { def doFreeBuild() { return hasProperty("freeBuild") } + +apply plugin: "checkstyle" +checkstyle { + toolVersion '8.24' +} + +task checkstyle(type: Checkstyle) { + classpath = files() + source "${project.rootDir}" + exclude("**/gen/**") +} diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml new file mode 100644 index 000000000..4bc3d0b51 --- /dev/null +++ b/config/checkstyle/checkstyle.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + +