Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/driver733/gradle-kotlin-setup-plugin
Gradle plugin for setting up Kotlin dependencies, plugins and build settings
https://github.com/driver733/gradle-kotlin-setup-plugin
Last synced: 21 days ago
JSON representation
Gradle plugin for setting up Kotlin dependencies, plugins and build settings
- Host: GitHub
- URL: https://github.com/driver733/gradle-kotlin-setup-plugin
- Owner: driver733
- License: mit
- Created: 2020-04-06T09:23:59.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-22T12:41:38.000Z (over 3 years ago)
- Last Synced: 2024-11-02T07:42:20.162Z (2 months ago)
- Language: Kotlin
- Homepage:
- Size: 216 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Gradle Kotlin Setup Plugin
[![Build](https://github.com/driver733/gradle-kotlin-setup-plugin/workflows/Build/badge.svg?branch=master)](https://github.com/driver733/gradle-kotlin-setup-plugin/actions?query=workflow%3ABuild+branch%3Amaster)
[![Gradle Plugin Portal](https://img.shields.io/maven-metadata/v?label=Gradle%20Plugin%20Portal&metadataUrl=https%3A%2F%2Fplugins.gradle.org%2Fm2%2Fcom%2Fdriver733%2Fgradle-kotlin-setup-plugin%2Fcom.driver733.gradle-kotlin-setup-plugin.gradle.plugin%2Fmaven-metadata.xml)](https://plugins.gradle.org/plugin/com.driver733.gradle-kotlin-setup-plugin)[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/driver733/gradle-kotlin-setup-plugin/actions?query=workflow%3ARelease)
[![Licence](https://img.shields.io/github/license/driver733/gradle-kotlin-setup-plugin)](https://github.com/driver733/gradle-kotlin-setup-plugin/blob/master/LICENSE)
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`](https://github.com/detekt/detekt)
2. Adds common Kotlin dependencies, such as:
1. `kotlin std lib`
2. `kotlin-reflect`
3. `kotlin-coroutines`
4. [`kotest` (with extensions)](https://github.com/kotest/kotest)
5. [`mockk`](https://github.com/mockk/mockk)
6. [`kotlin-logging`](https://github.com/MicroUtils/kotlin-logging)
and [other](https://github.com/driver733/gradle-kotlin-setup-plugin/blob/master/src/main/kotlin/com/driver733/gradle-kotlin-setup-plugin.gradle.kts)
3. Configures `kotlinOptions.jvmTarget` to match the `JavaPlugin.sourceCompatibility`
4. Resolves the Kotlin's [incompatibility](https://stackoverflow.com/a/35530223/2441104) 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](https://plugins.gradle.org/plugin/com.driver733.gradle-kotlin-setup-plugin) 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](https://docs.gradle.org/current/userguide/kotlin_dsl.html#kotdsl:precompiled_plugins)
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](https://github.com/driver733/gradle-kotlin-setup-plugin/blob/master/src/main/resources/config/detekt.yml)
detekt is configured to ignore errors. You can change this and other options in your build script:```kotlin
detekt {
ignoreFailures = true // Fail build on errors
autoCorrect = true // Automatically correct errors
}
```## Development
### Prerequisites
[JDK](https://stackoverflow.com/a/52524114/2441104) >= `v. 1.6`
### Build
```
./gradlew clean build
```### CI/CD
[Github actions](https://github.com/driver733/gradle-kotlin-setup-plugin/actions) is used for CI/CD.
### Releases
Releases to the Gradle Plugins portal are [automatically](https://github.com/driver733/gradle-kotlin-setup-plugin/actions?query=workflow%3ARelease) made on each commit on the master branch with the help of the [semantic-release](https://github.com/semantic-release/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](http://semver.org/) for versioning. For the versions available, see the [tags](https://github.com/driver733/gradle-kotlin-setup-plugin/tags).
## Authors
* **Mikhail [@driver733](https://www.driver733.com) Yakushin** - *Initial work*
See also the list of [contributors](https://github.com/driver733/gradle-kotlin-setup-plugin/graphs/contributors) who participated in this project.
## License
This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/driver733/gradle-kotlin-setup-plugin/blob/master/LICENSE) file for details.
## Acknowledgments
* [Gradle lombok plugin](https://plugins.gradle.org/plugin/io.freefair.lombok)
* [KengoTODA/gradle-semantic-release-plugin](https://github.com/KengoTODA/gradle-semantic-release-plugin)
* [semantic-release](https://github.com/semantic-release/semantic-release)