This PR adds support for spotless linting through Gradle as well as a GitHub Action to ensure that any pushes to master or pull requests targeted at master successfully build and conform to the linting standards.
Spotless configuration:
Utilizes the Google Java Format standard
Only marks issues for (or fixes) files which have changed from master
Validates Markdown and Gradle files as well as .gitignore
The spotlessCheck Gradle tasks reports files which do not conform
The spotlessApply Gradle task applies changes to all non-conformal files to bring them into compliance
spotlessCheck will run as part of any gradle build.
GitHub Action:
Runs two jobs "build" and "lint"
Runs on any pushes to master or any pull requests targeted at master
Utilizes JDK 1.14 as this is what I believe many students have installed
Build uses the assemble task in order to avoid doing any checks more than just a compilation
Lint runs spotlessCheck (see above)
Pull Requests to master will show whether or not these checks have passed.
Utilizes a Linux (Ubuntu) platform to run checks as they are faster and more readily accessible than a Windows option.
Additional Changes:
Gradle wrapper updated to 6.3 to officially support JDK 1.14 (needed for Linux platforms)
Modified gradlew to be executable on a Linux platform (change file permissions to 0755).
build.gradle linted per Spotless configuration.
Updated runtime to runtimeOnly as it is needed for future Gradle 7 compatibility (though there are some internal things to GradleRIO which prevent complete compatibility)
This PR adds support for spotless linting through Gradle as well as a GitHub Action to ensure that any pushes to
master
or pull requests targeted atmaster
successfully build and conform to the linting standards.Spotless configuration:
master
.gitignore
spotlessCheck
Gradle tasks reports files which do not conformspotlessApply
Gradle task applies changes to all non-conformal files to bring them into compliancespotlessCheck
will run as part of anygradle build
.GitHub Action:
master
or any pull requests targeted atmaster
assemble
task in order to avoid doing any checks more than just a compilationspotlessCheck
(see above)master
will show whether or not these checks have passed.Additional Changes:
gradlew
to be executable on a Linux platform (change file permissions to 0755).build.gradle
linted per Spotless configuration.runtime
toruntimeOnly
as it is needed for future Gradle 7 compatibility (though there are some internal things to GradleRIO which prevent complete compatibility)