Project structure

The project contains two modules:

  • main module: This contains the development code
  • test module: This contains tests for the application

The main module contains:

  • Kotlin directory (similar to Java) where all the Kotlin is placed (note that it is not enforced that the Kotlin code goes into the Kotlin directory, but it is a good convention to follow. In case you place it under another directory, then make sure to make appropriate changes to build.gradle).
  • Resources directory contains static resources such as HTML, CSS, JS, and images for the web application.

Here is the package structure with the base package as com.book that we follow. Feel free to follow a similar structure in your projects:

  • db: This contains database ...

Get Kotlin Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.