Skip to content

Gradle plugin for setting up Kotlin dependencies, plugins and build settings

License

Notifications You must be signed in to change notification settings

driver733/gradle-kotlin-setup-plugin

Repository files navigation

Gradle Kotlin Setup Plugin

Build Gradle Plugin Portal

semantic-release

Licence

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:

  1. Applies the following gradle plugins:
    1. kotlin-jvm
    2. KAPT
    3. detekt
  2. Adds common Kotlin dependencies, such as:
    1. kotlin std lib
    2. kotlin-reflect
    3. kotlin-coroutines
    4. kotest (with extensions)
    5. mockk
    6. kotlin-logging and other
  3. Configures kotlinOptions.jvmTarget to match the JavaPlugin.sourceCompatibility
  4. 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

  1. Create an issue and describe your problem/suggestion in it.
  2. Submit a pull request with a reference to the issue that the pull request closes.
  3. I will review your changes and merge them.
  4. 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

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.

Acknowledgments

About

Gradle plugin for setting up Kotlin dependencies, plugins and build settings

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages