build-commons
This plugin pre-configures Gradle for providing a rich java build. It enables a number of other plugins, including Eclipse, PMD, Checkstyle, Findbugs, BuildDashboard. Also, it provides a signature service, a wrapper task, pom generation and upload on OSSRH
Usage
apply plugin: 'org.danilopianini.build-commons'
buildscript {
repositories {
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "org.danilopianini:build-commons:0.1.6"
}
}
Configuration
The following Gradle properties are required for this plugin in order to work. You can specify them in your project's gradle.properties file, your ~/.gradle/gradle.properties, or wherever else you prefer, as far as Gradle associates them to your project before applying the plugin:
groupIdyour artifact's group idartifactIdyour artifact idlongNamethe full name of your projectprojectDescriptionA short description in natural language of what your project isversionthe version you are working on. Please note that, if you are using git flow or a similar tool, non master and non release branches will get their version annotated with the current branch and commit hashlicenseNamethe license you are usinglicenseUrlthe URL at which the license is available for readingreleaseBranchPrefixthe prefix of your release branch. UsuallyreleasemasterBranchthe name of your main branch. UsuallymasterscmTypethe scm you are using. Usuallyscm:gitscmRootUrlthe root of the url where your repo is stored, e.g.https://github.com/DanySKscmLoginthe part of the URL that gets appended to clone commands, for instancegit@github.com:DanySKscmRepoNamethe repository name, e.g.build-commons.gitgradleWrapperVersionthe version of Gradle to be used for the wrapperjdkVersionthe target version of the JDKjunitVersionthe JUnit versioncheckstyleVersionthe Checkstyle versionpmdVersionthe PMD versionpmdConfigFilethe path of the file where your pmd configuration is stored, relative to the projectpmdTargetJdkthe PMD target JDK. Usually1.7apivizVersionThe APIViz version to use, usually1.3.2.GAcheckstyleConfigFilethe path of the checkstyle rule file, relative to the projectsignArchivesIsEnablediftrue, the plugin will attempt at signing the artifacts. In this case, also thesigning.keyId,signing.password, andsigning.secretKeyRingFilemust be set (as per signing Gradle plugin setting). Also, you must have properly configured GPGossrhUsernameusername for OSSRH. Do not write it in clear textossrhPasswordyour OSSRH password. Again, no clear text here