https://github.com/christian-draeger/kotlin-library-template
A template project to jumpstart the creation and publishing of new Kotlin multiplatform libraries.
https://github.com/christian-draeger/kotlin-library-template
kotlin kotlin-multiplatform kotlin-multiplatform-library kotlin-multiplatform-sample library-template maven-publish
Last synced: 2 months ago
JSON representation
A template project to jumpstart the creation and publishing of new Kotlin multiplatform libraries.
- Host: GitHub
- URL: https://github.com/christian-draeger/kotlin-library-template
- Owner: christian-draeger
- License: mit
- Created: 2024-12-18T15:00:58.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-04-04T22:12:57.000Z (3 months ago)
- Last Synced: 2025-04-04T23:20:27.122Z (3 months ago)
- Topics: kotlin, kotlin-multiplatform, kotlin-multiplatform-library, kotlin-multiplatform-sample, library-template, maven-publish
- Language: Kotlin
- Homepage:
- Size: 176 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Kotlin Library Template [](https://github.com/christian-draeger/kotlin-library-template/actions/workflows/build.yml) 
An **opinionated Kotlin library template** designed to jumpstart your Kotlin library projects with ease. This template provides a robust and scalable foundation for library development, with built-in automation tools to guide you from initial setup to publishing and maintaining your library effortlessly.
## đ Features
- **âŠī¸ Quick Start:** No complex setup required. Simply fork this template, adjust the settings, and start coding.
- **đ§ą Modular Structure:** Designed from the ground up to support splitting your library into multiple smaller libraries, enabling more granular access and flexibility for users of your project.
- **đ Powered by Kotlin Multiplatform:** Offers full flexibility in choosing your target platforms
- **đĻ Automated Publishing:** Fully configured Gradle setup for publishing to Maven Central or other package repositories.
- **đŊ CI independent:** Every crucial task like build, test, release, linting, coverage measurement and automatic dependency updates can be executed manually via Gradle tasks.
- **đ Ready to go:** Everything you need to get started with your library included:
- [x] [Explicit API mode](https://kotlinlang.org/docs/whatsnew14.html#explicit-api-mode-for-library-authors) to enforce visibility to be specifically declared.
- [x] Automatic versioning following [Semantic Versioning](https://semver.org/) principles.
- [x] [Gradle version catalog](https://docs.gradle.org/current/userguide/version_catalogs.html) for easy and clean cross module dependency management.
- [ ] [Gradle convention plugins](https://docs.gradle.org/current/samples/sample_convention_plugins.html) for consistent and reusable project configuration.
- [x] Automatic dependency version checks and updates via [Gradle Versions Plugin](https://github.com/littlerobots/version-catalog-update-plugin).
- [x] static code analysis and linting via [detekt](https://detekt.dev/) and [ktlint](https://ktlint.github.io/).
- [ ] [OSS Review Toolkit](https://oss-review-toolkit.org/ort/docs/intro) integration for automated license compliance checks.
- [x] Testing setup and coverage reporting out of the box.
- **đ¤ CI/CD Ready:** Preconfigured GitHub Actions workflows for seamless builds, releases and maintenance.
- [x] Build, test and release snapshot version on every push to main.
- [x] One-Click publish to Maven Central with automatic versioning.
- [x] Scheduled automatic version catalog update updates via PR by using gradle task.---
## đ ī¸ Installation and Usage
Even though this template tries to reduce necessary manual steps as much as possible,
there are still some things you need to do, since you can not inherit some settings from github template repository.Please follow the [initial setup guide](INITIAL_SETUP.md) to get started. It won't take more than a few minutes.
---
## đ License
This repository is licensed under the [MIT License](LICENSE).
---
With this template, you can focus on writing great code while the boilerplate tasks are taken care of. Happy coding! đ