From bf6815b4bc592996962fb7b5a81196194d065c9b Mon Sep 17 00:00:00 2001 From: Malte Pickhan Date: Thu, 13 Jun 2019 07:52:42 +0200 Subject: [PATCH] extend readme with example for package exclusion. --- README.adoc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.adoc b/README.adoc index 34aa851b..dafe5c64 100644 --- a/README.adoc +++ b/README.adoc @@ -136,6 +136,14 @@ For source formatting, add the `spring-javaformat-gradle-plugin` to your `build` The plugin adds `format` and `checkFormat` tasks to your project. The `checkFormat` task is automatically applied when running the standard Gradle `check` task. +In case you want to exclude a package from being checked, for example if you generate sources, you can do this by adding following configuration: + +``` +tasks.withType(io.spring.javaformat.gradle.CheckTask) { + exclude "package/to/exclude" +} +``` + ==== Checkstyle To enforce checksyle conventions add the checkstyle plugin and include a dependency on `spring-javaformat-checkstyle`: