Skip to content

hbmartin/gradle-plugin-caffeinate

Repository files navigation

Caffeinate gradle plugin ☕️🐘

Gradle Plugin Portal Pre Merge Checks CodeFactor Maintainability Rating

How to Use 🎉

Install

  • Apply plugin to root project. Ensure you have gradlePluginPortal() in your repositories block.
  • Your project must be built with a minimum of Java 1.9
  • Be sure to activate the plugin as described below.
  • Choose 1 of the 3 options (apply to root project):

Version catalog:

[versions]
caffeinate = "0.0.2"
[plugins]
caffeinate = { id = "me.haroldmartin.gradle.caffeinate", version.ref = "caffeinate" }
plugins {
    alias(libs.plugins.caffeinate)
}

Kotlin:

plugins {
  id("me.haroldmartin.gradle.caffeinate") version "0.0.2"
}

Groovy:

plugins {
  id "me.haroldmartin.gradle.caffeinate" version "0.0.2"
}

Activate

Either set environment variable export ORG_GRADLE_PROJECT_caffeinate="true" or run gradle with the argument -Pcaffeinate=true

Development Environment 🛠

  • Based on kotlin-gradle-plugin-template
  • 100% Kotlin including Gradle DSL.
  • Plugin build setup with Gradle composite build.
  • Dependency versions managed via Gradle Versions Catalog (libs.versions.toml).
  • CI Setup with GitHub Actions.
  • Kotlin Static Analysis via ktlint and detekt.
  • This is using GitHub action to build, test and publish the plugin.
  • preMerge task to run all the checks before pushing.

Contributing 🤝

License 📄

This template is licensed under the MIT License - see the License file for details.