A Java SE 8 installation available either via the environment variable
JAVA_HOME
or on the path
- Run
git checkout -f main
- Run
git checkout HEAD~1
followed by./gradlew spotlessApply
: Rungit diff
to see that Spotless has added the copyright header toHelloWorld.java
correctly substituting the current year for$YEAR
- Run
git checkout -f main
followed by./gradlew spotlessApply
: Rungit diff
to see that Spotless has fixed the copyright header inHelloWorld.java
making no other changes besides eliminating the extra space before "All Rights Reserved"
- Run
git checkout -f test/5.4.0
- Run
git checkout HEAD~1
followed by./gradlew spotlessApply
: Rungit diff
to see that Spotless has added the copyright header toHelloWorld.java
correctly substituting the current year for$YEAR
- Run
git checkout -f test/5.4.0
followed by./gradlew spotlessApply
: Rungit diff
to see that Spotless has fixed the copyright header inHelloWorld.java
making no other changes besides eliminating the extra space before "All Rights Reserved"
- Run
git checkout -f test/5.5.0
- Run
git checkout HEAD~1
followed by./gradlew spotlessApply
: Rungit diff
to see that Spotless has added the copyright header toHelloWorld.java
correctly substituting the current year for$YEAR
but note thatspotlessJava
prints a warning (Can't parse copyright year '', defaulting to 2020
) - Run
git checkout -f test/5.5.0
followed by./gradlew spotlessApply
: Rungit diff
to see that Spotless has fixed the copyright header inHelloWorld.java
but besides eliminating the extra space before "All Rights Reserved" it has also changed the year to a range2020-4464
(it gets the4464
from the zip code in the address in the copyright header)