Skip to content

Module all-projects

A custom plugin which a default config for all projects

Download from MavenCentral

// buildSrc/build.gradle.kts

dependencies {


In the root build.gradle.kts

plugins {


Define the next properties in

The group for all projects will be

group = "com.javiersc.gradle-plugins


  • CLI pretty printing test results
  • Add allTests task to all projects
  • Create a test report in root-project/build/reports/allTests merging all projects reports.
  • Install pre-commits

Install pre-commit

There are multiple tasks for installing pre-commits:

  • installAllTestsPreCommit installs ./gradlew allTests pre-commit
  • installApiCheckPreCommit installs ./gradlew apiCheck pre-commit
  • installAssemblePreCommit installs ./gradlew assemble pre-commit
  • installSpotlessCheckPreCommit installs ./gradlew spotlessCheck pre-commit

All those tasks can be executed by just running installPreCommit.

Any pre-commit installation can be disabled, for example, disabling apiCheck:

allProjectsConfig {
    install {
        preCommit {