A minimalist template for building Kotlin applications with Gradle.
- Language: Kotlin
- Build System: Gradle (Kotlin DSL)
- Plugin: ShadowJar (9.6.1)
- Logging: Logback Classic (1.6.1)
├── build.gradle.kts # Main build configuration
├── settings.gradle.kts # Project settings
├── src/
│ └── main/
│ ├── kotlin/ # Your Kotlin source code
│ └── resources/ # Configuration files
- JDK 17+ installed on your machine.
To compile the code and generate a "fat" JAR:
./gradlew buildThe resulting JAR file will be located in build/libs/.
You can run the generated JAR using the following command:
java -jar build/libs/SimpleKotlin.jar- Change Project Name: Update
rootProject.nameinsettings.gradle.kts. - Update Dependencies: Add or modify libraries in
build.gradle.kts. - Configure Logging: Modify
src/main/resources/logback.xmlto adjust logging levels and appenders.