This a simple template to start a Java project using:
- Gradle 7 with kotlin script;
- ShadowJar plugin to package a executable (fat)jar;
- Checkstyle plugin with Google style guide rules;
- Jacoco plugin;
- JUnit 5 + Mockito;
- Logging with SLF4J + Log4j2.
- JDK 8+
- Clone this repo and delete the
.git
dir
git clone https://github.com/thiagogcm/java-starter.git PROJECT_NAME
- Replace
PROJECT_NAME
with a new name - Rename the
rootProject.name
property in thesettings.gradle
file with the new project name
./gradlew build
java -jar build/libs/PROJECT_NAME.jar
- For runtime coverage report:
./gradlew run
./gradlew applicationCodeCoverageReport
- For test coverage report:
./gradlew test
./gradlew jacocoJunit5TestReport