Skip to content

cbmarcum/skeletal-gradle-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Prerequisites

Make sure the version is updated in build.gradle , index.adoc, and jreleaser.yml files. Also generate the HTML file from the AsciiDoc source using the IntelliJ AsciiDoc 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 (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

Local Testing of the Plugin with Skeletal

To publish into your local Maven cache

./gradlew publishToMavenLocal

Edit the Skeletal project settings.gradle file and enable the resolution strategy abd local maven repository.

resolutionStrategy {
        eachPlugin {
            if (requested.id.namespace == 'net.codebuilders') {
                useModule("net.codebuilders:skeletal-gradle:${lazybonesGradlePluginVersion}")
            }
        }
    }
    
    repositories {
        // testing gradle plugin snapshots from local only
        mavenLocal()

        gradlePluginPortal()
    }

Publishing to a Maven Repository

To publish to a Maven repository, you will need to setup the repository URL and credentials in your Gradle settings file. 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.

Publishing to Gradle Plugins (Official Releases)

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_OUTPUT_DIRECTORY=build (until added to jreleaser.yml)
  2. jreleaser config
  3. jreleaser full-release --dry-run
  4. check build/jreleaser/release/CHANGELOG.md for errors
  5. jreleaser full-release

Credits

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

About

A Gradle Plugin to Package and Publish Lazybones Templates

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages