Micronaut internal Gradle plugins. Not intended to be used in user's projects.
The plugins are published in Bintray:
buildscript {
repositories {
maven { url "https://dl.bintray.com/micronaut/core-releases-local" }
}
dependencies {
classpath "io.micronaut.build:micronaut-gradle-plugins:2.0.0.RC2"
}
}
Then, apply the individual plugins as desired
-
io.micronaut.build.common
.- Defines
jcenter()
as a project repository. - Configures the version to the
projectVersion
property (usually defined ingradle.properties
). - Configures Java / Groovy compilation options.
- Configures dependencies, enforcing the Micronaut BOM defined in
micronautVersion
property, as well as the version defined ingroovyVersion
. - Configures the IDEA plugin.
- Configures Checkstyle.
- Configures the Spotless plugin, to apply license headers.
- Configures the test logger plugin.
- Defines
-
io.micronaut.build.dependency-updates
:- Configures the
com.github.ben-manes.versions
plugin to check for outdated dependencies.
- Configures the
-
io.micronaut.build.publishing
:- Configures publishing to JFrog OSS, Bintray and Maven Central.
-
io.micronaut.build.docs
:- Configures the guide publishing stuff.
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.