A Gradle plugin that applies healthy defaults to a Spring project to enable releases with minimal manual intervention.
- Gradle 3.x. Officially tested on Gradle 3.5.
To apply the plugin, see the instructions on the Gradle plugin portal.
The project plugin applies a set of sensible defaults to Spring projects:
- Adds a properties section to a generated POM publication with information about the environment and status of the repository when the artifact was built.
- Configures a
maven-publish
publication. - Substitutes dynamic revisions in the generated POM with fixed versions.
- Adds SCM information to the POM.
- Adds exclude information to the POM.
- Generates a javadoc jar
- Generates a source jar
- Applies the Nebula contacts plugin, requiring information about chief committers.
- Configures license header checks on files. Also places a default license header template
in
gradle/licenseHeader.txt
which is applied to any file needing a license header. Conditions release builds upon having proper license headers in all source files. - Configures Asciidoc compilation and uploading to Github pages.
- Adds the
nebula.release
plugin. - Configures
nebula.bintray-publishing
, automatically filling all the relevant Bintray configuration based on any git remote attached to your repository that has an organization containing the wordspring
.
To generate a CircleCI configuration for your project, run ./gradlew initCircle
. Commit the generated files. Enable
your project in CircleCI.
To release your project, create a release in Github with a version like 1.0.0
(semver). Alternatively,
tag your project with a version like 1.0.0
and push the tag. Both have the effect of causing the CircleCI configuration
to realize a release is being built and do the right thing.
To build and upload a release to Bintray, run ./gradlew clean final
. This will build the project, upload it to
Bintray, tag the repository and push the tag to the origin remote. The version number will be a minor version increment
of the latest semver-like tag found in the repo.
To perform a major or patch release, run ./gradlew clean final -Prelease.scope=major
or ./gradlew clean final -Prelease.scope=patch
.
To generate license headers for your source files, run ./gradlew licenseFormat
.
To build docs, run ./gradlew asciidoctor
.
To upload docs to your project's Github pages, run ./gradlew publishGithubPages
.