From a530a729b2b76b959977735a09e43c3f891ee8ac Mon Sep 17 00:00:00 2001 From: Nelson Osacky Date: Mon, 27 Nov 2017 18:50:10 +0100 Subject: [PATCH 1/2] Add Android example to gradle plugin readme. Ref #111 --- plugin-gradle/README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/plugin-gradle/README.md b/plugin-gradle/README.md index 78c57d85bd..674d0dc0ca 100644 --- a/plugin-gradle/README.md +++ b/plugin-gradle/README.md @@ -122,6 +122,19 @@ See [ECLIPSE_SCREENSHOTS](../ECLIPSE_SCREENSHOTS.md) for screenshots that demons +### Applying to Android Java source +Be sure to add `target '**/*.java'` otherwise spotless will not detect Java code inside Android modules. + +```gradle +spotless { + java { + // ... + target '**/*.java' + // ... + } +} +``` + ## Applying to Java source ([google-java-format](https://github.com/google/google-java-format)) ```gradle From 6f5805baaec7269f1153a97c6c8276a419475499 Mon Sep 17 00:00:00 2001 From: Ned Twigg Date: Fri, 1 Dec 2017 11:35:28 -0800 Subject: [PATCH 2/2] Improved link tags. --- plugin-gradle/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin-gradle/README.md b/plugin-gradle/README.md index 674d0dc0ca..7ca47dbcfc 100644 --- a/plugin-gradle/README.md +++ b/plugin-gradle/README.md @@ -120,7 +120,7 @@ spotless { See [ECLIPSE_SCREENSHOTS](../ECLIPSE_SCREENSHOTS.md) for screenshots that demonstrate how to get and install the eclipseFormatFile and importOrderFile mentioned above. - + ### Applying to Android Java source Be sure to add `target '**/*.java'` otherwise spotless will not detect Java code inside Android modules. @@ -135,6 +135,8 @@ spotless { } ``` + + ## Applying to Java source ([google-java-format](https://github.com/google/google-java-format)) ```gradle