Skip to content

This repository serves as template for kotlin projects which use gradle as build tool.

License

Notifications You must be signed in to change notification settings

Lahres-Dev/kotlin-gradle-single-module

Repository files navigation

License

Quality Gate Status Reliability Rating Security Rating Maintainability Rating
Lines of Code Coverage Duplicated Lines (%)

GitHub release (latest by date)

Introduction

This repository serves as template for kotlin projects which use gradle as build tool.

Features are:

  • Sample kotlin class file with simple output.
  • Single module gradle project
  • Static code analysis with Sonar -> Project Page
  • Self-contained jar file creation
  • Unit tests. Results, created by JaCoCo, are found on sonar project page.
  • Sample license and readme file
  • Git as version control system with .gitignore file to exclude automatically created files from repository.

Building the project

Just run the following gradle task

build

The output can be found inside the build folder.


Generating Sonar report

To generate a sonar report, the following gradle task has to be run

sonarqube

You need to set systemProp.sonar.login inside your local gradle.properties file. The sonar login token can be generated on the sonar account page (needs admin rights).


Running the self-contained jar file

To run the self-contained jar file

java -jar build/libs/kotlin-gradle-single-module-1.0-SNAPSHOT.jar

Output should be:

Hello Jack. You're 22 years old, and your gender is male.

About

This repository serves as template for kotlin projects which use gradle as build tool.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages