Skip to content

Commit

Permalink
Moved plugin id to com.diffplug.image-grinder.
Browse files Browse the repository at this point in the history
  • Loading branch information
ntwigg authored and ntwigg committed Jan 24, 2020
1 parent 5c17c0b commit 313446b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## [Unreleased]
### Changed
- Plugin id is now `com.diffplug.image-grinder`.
- You can still use the legacy `com.diffplug.gradle.image-grinder` if you want.
- Upgraded Batik from `1.11` to `1.12`.
- Upgraded build to [blowdryer](https://github.com/diffplug/blowdryer).

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!---freshmark shields
output = [
link(shield('Gradle plugin', 'plugins.gradle.org', 'com.diffplug.gradle.image-grinder', 'blue'), 'https://plugins.gradle.org/plugin/com.diffplug.gradle.image-grinder'),
link(shield('Gradle plugin', 'plugins.gradle.org', 'com.diffplug.image-grinder', 'blue'), 'https://plugins.gradle.org/plugin/com.diffplug.image-grinder'),
link(shield('Maven central', 'mavencentral', 'available', 'blue'), 'https://search.maven.org/artifact/com.diffplug.gradle/image-grinder'),
link(shield('Apache 2.0', 'license', 'apache-2.0', 'blue'), 'https://tldrlegal.com/license/apache-license-2.0-(apache-2.0)'),
'',
Expand All @@ -12,7 +12,7 @@ output = [
link(image('JitCI', 'https://jitci.com/gh/diffplug/image-grinder/svg'), 'https://jitci.com/gh/diffplug/image-grinder')
].join('\n');
-->
[![Gradle plugin](https://img.shields.io/badge/plugins.gradle.org-com.diffplug.gradle.image--grinder-blue.svg)](https://plugins.gradle.org/plugin/com.diffplug.gradle.image-grinder)
[![Gradle plugin](https://img.shields.io/badge/plugins.gradle.org-com.diffplug.image--grinder-blue.svg)](https://plugins.gradle.org/plugin/com.diffplug.image-grinder)
[![Maven central](https://img.shields.io/badge/mavencentral-available-blue.svg)](https://search.maven.org/artifact/com.diffplug.gradle/image-grinder)
[![Apache 2.0](https://img.shields.io/badge/license-apache--2.0-blue.svg)](https://tldrlegal.com/license/apache-license-2.0-(apache-2.0))

Expand All @@ -28,7 +28,7 @@ output = prefixDelimiterReplace(input, 'https://javadoc.io/static/com.diffplug.g

## Simple image processing

To use it, just [add image-grinder to your buildscript](https://plugins.gradle.org/plugin/com.diffplug.gradle.image-grinder), and configure it as so:
To use it, just [add image-grinder to your buildscript](https://plugins.gradle.org/plugin/com.diffplug.image-grinder), and configure it as so:

```groovy
imageGrinder {
Expand Down
9 changes: 7 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
license=apache
git_url=github.com/diffplug/image-grinder

plugin_list=imageGrinder
plugin_list=imageGrinder imageGrinderLegacy
plugin_tags=image svg png
plugin_imageGrinder_id=com.diffplug.gradle.image-grinder
plugin_imageGrinder_id=com.diffplug.image-grinder
plugin_imageGrinder_impl=com.diffplug.gradle.imagegrinder.ImageGrinderPlugin
plugin_imageGrinder_name=Image Grinder
plugin_imageGrinder_desc=Image manipulation for Gradle

plugin_imageGrinderLegacy_id=com.diffplug.gradle.image-grinder
plugin_imageGrinderLegacy_impl=com.diffplug.gradle.imagegrinder.ImageGrinderPlugin$Legacy
plugin_imageGrinderLegacy_name=Back-compat alias to com.diffplug.image-grinder
plugin_imageGrinderLegacy_desc=Back-compat alias to com.diffplug.image-grinder

maven_group=com.diffplug.gradle
maven_name=image-grinder
maven_desc=Image manipulation for Gradle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public class ImageGrinderPlugin implements Plugin<Project> {

@Override
public void apply(Project project) {
project.getPlugins().apply(Legacy.class);
project.getExtensions().add(NAME, project.container(ImageGrinderTask.class, new NamedDomainObjectFactory<ImageGrinderTask>() {
@Override
public ImageGrinderTask create(String name) {
Expand All @@ -40,4 +41,12 @@ public ImageGrinderTask create(String name) {
}
}));
}

/** The legacy `com.diffplug.gradle.image-grinder`, does exactly the same thing as `com.diffplug.image-grinder`. */
public static class Legacy implements Plugin<Project> {
@Override
public void apply(Project project) {
project.getPlugins().apply(ImageGrinderPlugin.class);
}
}
}

0 comments on commit 313446b

Please sign in to comment.