diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml
new file mode 100644
index 0000000..0fd2bce
--- /dev/null
+++ b/config/checkstyle/checkstyle.xml
@@ -0,0 +1,165 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/config/checkstyle/header.txt b/config/checkstyle/header.txt
new file mode 100644
index 0000000..98bc80a
--- /dev/null
+++ b/config/checkstyle/header.txt
@@ -0,0 +1,17 @@
+^\Q/*\E$
+^\Q * Copyright 2014-\E20\d\d\Q the original author or authors.\E$
+^\Q *\E$
+^\Q * Licensed under the Apache License, Version 2.0 (the "License");\E$
+^\Q * you may not use this file except in compliance with the License.\E$
+^\Q * You may obtain a copy of the License at\E$
+^\Q *\E$
+^\Q * http://www.apache.org/licenses/LICENSE-2.0\E$
+^\Q *\E$
+^\Q * Unless required by applicable law or agreed to in writing, software\E$
+^\Q * distributed under the License is distributed on an "AS IS" BASIS,\E$
+^\Q * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\E$
+^\Q * See the License for the specific language governing permissions and\E$
+^\Q * limitations under the License.\E$
+^\Q */\E$
+^$
+^.*$
diff --git a/config/checkstyle/suppressions.xml b/config/checkstyle/suppressions.xml
new file mode 100644
index 0000000..915c20f
--- /dev/null
+++ b/config/checkstyle/suppressions.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/gradle/java.gradle b/gradle/java.gradle
index dfcdf58..b3c7a35 100644
--- a/gradle/java.gradle
+++ b/gradle/java.gradle
@@ -6,6 +6,7 @@ apply plugin: 'propdeps'
apply plugin: 'propdeps-idea'
apply plugin: 'propdeps-eclipse'
apply plugin: 'com.github.ben-manes.versions'
+apply plugin: 'checkstyle'
group = 'org.springframework.session'
@@ -75,6 +76,12 @@ task integrationTest(type: Test, dependsOn: jar) {
}
check.dependsOn integrationTest
+checkstyle {
+ configFile = rootProject.file('config/checkstyle/checkstyle.xml')
+ configProperties.configDir = configFile.parentFile
+ toolVersion = '6.16.1'
+}
+
eclipse {
classpath {
plusConfigurations += [ configurations.integrationTestCompile ]
@@ -83,4 +90,4 @@ eclipse {
project.idea.module {
scopes.TEST.plus += [project.configurations.integrationTestRuntime]
-}
\ No newline at end of file
+}