https://github.com/darvld/kotlin-project-template
A template for single-module Kotlin applications and libraries.
https://github.com/darvld/kotlin-project-template
kotlin kotlin-jvm template-repository
Last synced: 3 months ago
JSON representation
A template for single-module Kotlin applications and libraries.
- Host: GitHub
- URL: https://github.com/darvld/kotlin-project-template
- Owner: darvld
- Created: 2022-12-01T04:49:14.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-27T00:41:27.000Z (over 2 years ago)
- Last Synced: 2025-02-10T08:13:06.668Z (4 months ago)
- Topics: kotlin, kotlin-jvm, template-repository
- Language: Kotlin
- Homepage:
- Size: 63.5 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Kotlin project template
A minimal Kotlin JVM project template.
## Using this template
This is a Template repository, which means instead of cloning it, you can click on the `Use this template`
button, and GitHub will automatically create a repository for you with this template's code. After the repository is
created, a pre-defined cleanup workflow will run, replacing the default project name with your repository's name.
Allow this workflow to run before cloning your repository.## Structure:
This project uses a custom directory structure to reduce nesting. The Gradle project is configured to detect the custom
locations for source sets:```kotlin
sourceSets {
main {
kotlin.srcDir("src")
resources.srcDir("resources")
}test {
kotlin.srcDir("test")
resources.srcDir("testResources")
}
}
```See the full configuration in the
project's [build script](https://github.com/darvld/kotlin-project-template/blob/main/build.gradle.kts).## Declaring dependencies
This project uses
Gradle's [Version Catalogs](https://docs.gradle.org/current/userguide/platforms.html#sub:version-catalog)
feature to declare dependencies. See the
project's [`libs.versions.toml`](https://github.com/darvld/kotlin-project-template/blob/main/gradle/libs.versions.toml)
file for instructions on how to use this feature.## Running the sample code
Use the Gradle Application plugin to run the sample app:
```commandline
gradle run
```