Skip to content

micronaut-projects/micronaut-build

Folders and files

NameName
Last commit message
Last commit date

Latest commit

80ea8f6 · Feb 25, 2025
Feb 25, 2025
May 2, 2021
May 23, 2023
Feb 25, 2025
Feb 25, 2025
May 27, 2020
Mar 6, 2024
Aug 1, 2019
Mar 2, 2023
Nov 20, 2024
Feb 25, 2025
Feb 20, 2025
Oct 18, 2024
May 28, 2020
Aug 1, 2019
Feb 20, 2025

Repository files navigation

micronaut-build Maven Central

Micronaut internal Gradle plugins. Not intended to be used in user's projects.

Usage

The plugins are published in Maven Central:

buildscript {
    dependencies {
        classpath "io.micronaut.build:micronaut-gradle-plugins:5.2.0"
    }
}

Then, apply the individual plugins as desired

Available plugins

  • io.micronaut.build.internal.common.

    • Configures the version to the projectVersion property (usually defined in gradle.properties).
    • Configures Java / Groovy compilation options.
    • Configures dependencies, enforcing the Micronaut BOM defined in micronautVersion property, as well as the version defined in groovyVersion.
    • Configures the IDEA plugin.
    • Configures Checkstyle.
    • Configures the Spotless plugin, to apply license headers.
    • Configures the test logger plugin.
  • io.micronaut.build.internal.dependency-updates:

    • Configures the com.github.ben-manes.versions plugin to check for outdated dependencies.
  • io.micronaut.build.internal.version-catalog-updates:

    • An alternative to io.micronaut.build.internal.dependency-updates which is usable on projects that make use of Gradle's version catalogs
  • io.micronaut.build.internal.publishing:

    • Configures publishing to Sonatype OSSRH and Maven Central.
  • io.micronaut.build.internal.docs:

    • Configures the guide publishing stuff.
  • io.micronaut.build.internal.quality-checks:

    • Applied automatically by the common plugin; configures Checkstyle, Jacoco and Sonar.
  • io.micronaut.build.internal.quality-reporting:

    • To be applied to the root project only; it consumes and aggregates the reports produced by the quality-checks plugin.

Configuration options

Default values are:

micronautBuild {
    sourceCompatibility = '1.8'
    targetCompatibility = '1.8'

    checkstyleVersion = '8.33'

    dependencyUpdatesPattern = /.+(-|\.?)(b|M|RC)\d.*/
}

Also, to pin a dependency to a particular version:

micronautBuild {
    resolutionStrategy {
        force "com.rabbitmq:amqp-client:${rabbitVersion}"
    }    
}

You can use the same DSL as in Gradle.