Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[build] Use Spotless plugin to enforce/update copyright headers (reac…
…tor#2729) This commit introduces the Spotless plugin, which is capable of only applying checks to files that have changed compared to a given branch (by default in this PR, 3.3.x). For now, only java files are considered, excluding JDK stubs. This allows to enforce license header with up-to-date end year only when a file get touched (no need for a big bang update of the end year in all files comes new year). The year variable in the template is compatible with IntelliJ's own template format (velocity), although IntelliJ doesn't typically include the comment characters like in the added template file. The template includes 2 blank lines at the end so that one blank line remains after the license header once spotless is applied. The ratchet (apply spotless only to files that changed between current commit and the specified branch) is adapted depending on local build, CI build without any specific parameter and CI build explicitly intended for spotless (thanks to -PspotlessFrom=branch). The later is necessary because spotless needs a full checkout, which is typically not done by default by CI platforms like GitHub Actions. In Github Actions, `spotlessCheck` is made a separate step in the "other tests" job. See reactor/reactor#701
- Loading branch information