Skip to content

mxenabled/coppuccino

Repository files navigation

Release

Coppuccino

Gradle plugin collection for Java/Kotlin/Groovy style, standard, and safety enforcement.

What does it do?

Pulls together and configures the best java, kotlin, groovy style plugins. Defaults are setup for MX developers, but can be overridden.

Plugins:

Installing

Coppuccino is hosted via JitPack. To import it into your project, configure the JitPack repository in your build.gradle.

plugins {
  id: "com.github.mxenabled.coppuccino" version "3.3.0"
}
allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

Configuration

Example configuration with default values:

In build.gradle

coppuccino {
  rootDir = "" # Relative path to project root
  overwriteConfigs = true # Set to false to allow a project to manage its own copy of configs (e.g. spotbugs/exclude.xml) 
  coverage {
    minimumCoverage = 0.0   # Required percentage of test code coverage.
    excludes [ # Package paths to exclude from coverage calculation
      'com.mx.mdx.models.*',
      'com.mx.mdx.Resources.*',
      'com.mx.mdx.Resources'
    ]
  }
  dependencies {
    lockingEnabled = true
    excludePreReleaseVersions = true # Set to false to allow for #.#.3.pre release versions to be included in --write-locks
  }
  java {
    enabled = true # Set to false to disable checkstyle (e.g. for projects that have no java files)
  }
  kotlin {
    enabled = false # Set to true to enable kotlin linting with Detekt
  }
}

Init MX style configurations

$ gradle initCopConfigs

Deploying Locally

To create a local build of the accessor to use in connector services use

$ ./gradlew install

This will create a local build in your local maven repository that you can then reference in other services.

On OXS using gradle the default location for the local maven repository is

~/.m2/repository/com/mx/