All Projects → Karumi → play-framework-kotlin

Karumi / play-framework-kotlin

Licence: other
This repository is to show how to create an Play Framework project using Kotlin

Programming Languages

kotlin
9241 projects
scala
5932 projects

Karumi logo Play Framework Kotlin

This repository is used to show how to create a Play Framework project using Kotlin.

ktlint-plugin

This project uses the 1.0.9 version of kotlin-plugin we implemented here pfn/kotlin-plugin#24 to run kotlin tests.

ktlint-sbt plugin

We use ktlint-sbt as a linter and formatter.

  • Run sbt ktlint

If you would like to run ktlint with formatter mode automatically before a git commit you can use this pre-commit git hook.

Running in local

This project runs with Play Framework, you will need to install some tools and follow some simple steps to be able to run the project locally:

  1. Install sbt.
  2. Install docker.
  3. Run docker-compose up -d. This step starts postgresql database service.
  4. Run sbt run. This will start the server itself and will reload itself whenever a new change is made to any of the project files.

Run Test

Run sbt test to run all the tests or sbt "test-only *ClassName" if you would like to run a single test.

Limitations

  • kotlin-plugin doesn't support 1.2 kotlin version yet.
  • If you like to use twirl templates requires a mixed kotlin-java-scala compilation.

License

Copyright 2018 Karumi

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].