Gradle Kotlin Setup Plugin
This plugin makes it easy to set up Koltin in a new project as well as in an existing Java project.
More specifically this plugin does the following:
- Applies the following gradle plugins:
kotlin-jvm
KAPT
detekt
- Adds common Kotlin dependencies, such as:
kotlin std lib
kotlin-reflect
kotlin-coroutines
kotest
(with extensions)mockk
kotlin-logging
and other
- Configures
kotlinOptions.jvmTarget
to match theJavaPlugin.sourceCompatibility
- Resolves the Kotlin's incompatibility with Lombok by delomboking
the project's java source code and pointing the
JavaPlugin
compile tasks to the delomboked source code files.
Distribution
The plugin is available on the Gradle Plugins portal.
Getting Started
Requirements
Gradle >= v. 6.0
is required to use this plugin, because it is a
precompiled script plugin
built with Gradle >= v. 6.0
.
Install
Groovy DSL
Add this to your project's build.gradle
:
plugins {
id "com.driver733.gradle-kotlin-setup-plugin" version "6.0.3"
}
Kotlin DSL
Add this to your project's build.gradle.kts
:
plugins {
id("com.driver733.gradle-kotlin-setup-plugin") version "6.0.3"
}
Detekt
By default detekt is configured to ignore errors. You can change this and other options in your build script:
detekt {
ignoreFailures = true // Fail build on errors
autoCorrect = true // Automatically correct errors
}
Development
Prerequisites
JDK >= v. 1.6
Build
./gradlew clean build
CI/CD
Github actions is used for CI/CD.
Releases
Releases to the Gradle Plugins portal are automatically made on each commit on the master branch with the help of the semantic-release.
Contributing
- Create an issue and describe your problem/suggestion in it.
- Submit a pull request with a reference to the issue that the pull request closes.
- I will review your changes and merge them.
- A new version with your changes will be released automatically right after merging.
Versioning
We use SemVer for versioning. For the versions available, see the tags.
Authors
- Mikhail @driver733 Yakushin - Initial work
See also the list of contributors who participated in this project.
License
This project is licensed under the MIT License - see the LICENSE.md file for details.