To assemble a jar file for your project, run the "jar" gradle task, either through IntelliJ or by doing
gradle jar
on a terminal. Gradle will automatically download all dependencies needed to compile your jar file,
which will be stored in the build/libs folder.
Make sure to edit the main class attribute the build.gradle file, you'll need to change it in order to obtain a working jar file.
This is the gradle configuration file. Modify this file to add dependencies to your project. In general you should only modify the depedencies section of this file, however there are a few modification you will need to make when you begin the project
-
mainClassName
- Modifiy this variable to point to your main class. By default it is
edu.wpi.teamname.Main
, but once you update your teamname package to your team letter you will need to update this path.
- Modifiy this variable to point to your main class. By default it is
-
jaCoCo
- jaCoCo is a JAva COde COverage checker that enforces testing. By default the rules are 25
% line coverage and 25% branch coverage, but if you would like to be more successful you
should raise these numbers higher to enforce team members to write more tests. Simply modify
the
minimum
values to enforce stricter tests (but do not change to below .25, as that is the required minimum for this class)
- jaCoCo is a JAva COde COverage checker that enforces testing. By default the rules are 25
% line coverage and 25% branch coverage, but if you would like to be more successful you
should raise these numbers higher to enforce team members to write more tests. Simply modify
the
-
spotless
- spotless is a style guider checker/formatter that will automatically detect if your code adheres to an agreed style guide. For this starter code I have defaulted to Google's style guide, as it is well known and well liked. You can find more documentation for spotless here. If you would like to disable the spotless checks, comment out the spotless plugin as well as the spotless configuration at the bottom of the file
This is the Travis-CI configuration file. Only modify this file if you are sure you know what you are doing
This is the configuration for Lombok, a very useful java library that makes 'enterprise' coding a breeze. Only modify this file if you are sure you know what you are doing
This file tells git which files to ignore in the repo. It should be correctly configured already Only modify this file if you are sure you know what you are doing
This directory contains useful git hooks that will force your teammates to run tests *before
- pushing to github. There are currently two hook files
- pre-commit
- pre-commit will automatically format your files to adhere to the google style guide. This is helpful as it makes code more readable, but also prevents commits that contain a large number of style guide changes
- pre-push
- pre-push will run gradle tests to make sure code passes before you push to github
To install these hooks, simple run cp .hooks/* .git/hooks/
from the root directory
Config contains styleguide config files both for checkstyle (another optional plugin for gradle ) and for intellij. Teams should determine a style guide to follow to make although it is not a requirement for this class.
To install the styleguide scheme into IntelliJ, Preferences -> Editor -> Code Style -> Scheme -> ... -> Import Scheme -> IntelliJ IDEA code style XML
, then select config/intellij-java -google-style.xml
from the project's root directory