Skip to content

Latest commit

 

History

History
60 lines (41 loc) · 1.8 KB

development.md

File metadata and controls

60 lines (41 loc) · 1.8 KB

Development

The plugin is organised to allow you to use a fork and deploy your own custom version of it to a maven repository.

Using plugin locally from another project

A settings.gradle file is included at the root level in order to allow you to use the plugin in a multi-project build. Specifically this allows you to symlink the root of the plugin from the buildSrc/ directory of another project so you can reference multiple custom plugins in other projects.

To do this cd to the project where you would like to use your own checkout of the plugin and:

mkdir buildSrc
ln -s /path/to/gradle-aws-plugin ./

Then add the following files to the buildSrc/ directory:

buildSrc/build.gradle

apply plugin: "java"

repositories {
  mavenCentral()
}

dependencies {
  runtime subprojects.findAll { it.getTasksByName("jar", false) }
}

buildSrc/settings.gradle

rootProject.name = 'my-project-build'

include 'gradle-aws-plugin'

This will make all subprojects in buildSrc/ with jar archives available as plugins to your main project provided you add the appropriate include directive in settings.gradle (see: gradle forum post).

Deploying plugin artifact to maven

If you would like to push your own version of the plugin to a maven repository you can do so by changing the group property to your own maven group name in the build.gradle of the plugin and creating a file in deploy/ named ${group}.gradle.

Implement the logic to publish your archive in that file, then run the command to publish.

See for example:

ujp.classmethod.aws.gradle

Or using maven-publish:

TouchType.gradle.