Home

Awesome

Skeletal Gradle Plugin

Quick Links

Introduction

This Gradle plugin is a sibling project to the Skeletal Project Creation Tool and was originally a sub-project in the original Lazybones Project before this fork of the project.

The mechanics of publishing Lazybones templates is straightforward and could be done manually. That doesn't mean it's not a lot of work though. If you want to manage and publish Lazybones templates, we strongly recommend you use Gradle along with this plugin.

The plugin allows you to manage multiple templates, giving you the tools to package, install, and publish them individually or all together. In addition, you can also easily set up subtemplates. Let's see how you use the plugin.

Building the Plugin

To build into a repo within the build output

./gradlew publish

This builds a repo layout that you can use from an Artifactory Gradle repository or similar artifact repository.

checksums and signatures removed for brevity and version may not be latest...

build/repos/releases
`-- net
    `-- codebuilders
        |-- lazybones-templates
        |   `-- net.codebuilders.lazybones-templates.gradle.plugin
        |       |-- 1.7.1
        |       |   |-- net.codebuilders.lazybones-templates.gradle.plugin-1.7.1.pom
        |       `-- maven-metadata.xml
        `-- skeletal-gradle
            |-- 1.7.1
            |   |-- skeletal-gradle-1.7.1.jar
            |   |-- skeletal-gradle-1.7.1-javadoc.jar
            |   |-- skeletal-gradle-1.7.1.module
            |   |-- skeletal-gradle-1.7.1.pom
            |   |-- skeletal-gradle-1.7.1-sources.jar
            `-- maven-metadata.xml

To publish into your local Maven cache

./gradlew publishToMavenLocal

You will need to either setup signing credentials for the Signing Plugin, make the version end in -SNAPSHOT, or force the build variable isReleaseVersion to false.

To publish to Gradle Plugins

./gradlew publishPlugins

This can only be done by the Skeletal project owner for this plugin name.

Creating a Release

Releases are created in the GitHub repo by creating a tag and a Release based on that tag and a Changelog of major changes and uploading build artifacts and source archives.

This is automated by JReleaser using the jreleaser.yml configuration file.

Steps to create a release after Gradle publish or publishPlugins

  1. export JRELEASER_PROJECT_VERSION=version to release
  2. export JRELEASER_OUTPUT_DIRECTORY=build (until added to jreleaser.yml)
  3. jreleaser config
  4. jreleaser full-release --dry-run
  5. check build/jreleaser/release/CHANGELOG.md for errors
  6. jreleaser full-release

Credits

The complete list going back to Lazybones can be found in the Skeletal Credits.