This is a template for starting new projects.
It uses the Gradle build system for handling a majority of the basic development tasks.
This repository contains a basic Java Gradle project with a basic .gitignore and .editorconfig
This template has the following gradle plugins pre-enabled. Each serves their own useful purpose.
- FindBugs: Finds common bugs in Java source code.
- Checkstyle Plugin: Helps programmers adhere to a coding standard.
- JaCoCo: Unit test coverage reporting.
- Versions: Helper for finding updates to project dependencies.
- Reporter: Better unit test console reporting.
- License: Can auto add a license header to source files in the project.
- Stats: Every wonder how many lines of source code you have? This plugin is for you.
- Versioning: Generators properties file using SCM versioning info.
These are the pre-enabled java dependencies for this template project.
- JUnit [v4.12.0]: Java unit testing framework.
- SLF4J [v1.7.25]: Logging facade. Allows for drop in replacement for actual logging implementation.
- Logback [v1.2.3]: Preferred logging implementation for SLF4J.
- RxJava [vv2.1.0]: Functional reactional programming in Java. I use this is most of my projects which is why it is here.
- JDK 8
As this project comes with a gradle wrapper, having Gradle installed is not nessesary. Instead pass all gradle commands to gradlew (the file extension used will depend on what operating system you are on).
git clone https://github.com/thenightwolf/java-template-project
gradlew build
For the 2.0.0 release of this template, I plan on separating all configuration variables to their own file. Until then, most of the configuration can be done in the build.gradle file.
You should change the variable mainClassName to point to your project's start class.
The LICENSE header variables can be found under the license section of the build script. The three main ones are:
ext.year
ext.name
ext.email
I have also changed the header style for java files from the default JavaDoc style to the SlashStar style (normal comment style). This is because if the JavaDoc style is left on, then they clutter up the JavaDocs.
The content here is licensed under the MIT License