https://github.com/kamatama41/gradle-embulk-plugin
A Gradle plugin that provides some helpful tasks for your Embulk plugin's development.
https://github.com/kamatama41/gradle-embulk-plugin
embulk gradle
Last synced: 2 months ago
JSON representation
A Gradle plugin that provides some helpful tasks for your Embulk plugin's development.
- Host: GitHub
- URL: https://github.com/kamatama41/gradle-embulk-plugin
- Owner: kamatama41
- License: mit
- Created: 2017-02-24T17:33:17.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-03-31T06:16:33.000Z (over 7 years ago)
- Last Synced: 2025-11-21T03:07:07.179Z (7 months ago)
- Topics: embulk, gradle
- Language: Kotlin
- Homepage:
- Size: 269 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://circleci.com/gh/kamatama41/gradle-embulk-plugin)
# gradle-plugin-embulk
This Gradle plugin provides you with some tasks to help your [Embulk](http://www.embulk.org) plugin development.
## Supported Gradle version
It's tested on Gradle 4.10.3. It might not work on other version.
## Getting started
Add the snippets to your build.gradle
```gradle
buildscript {
repositories {
jcenter()
maven { url 'http://kamatama41.github.com/maven-repository/repository' }
}
dependencies {
classpath "com.github.kamatama41:gradle-embulk-plugin:"
}
}
apply plugin: "com.github.kamatama41.embulk"
embulk {
version = "0.8.18"
category = "file-input"
name = "xlsx"
authors = ["A User"]
email = "a.user@example.com"
homepage = "https://github.com/a.user/embulk-input-xlsx"
}
```
So that you can generate your plugin template with the command `(./gradlew|gradle) newPlugin`
```
% gradle newPlugin
Starting a Gradle Daemon (subsequent builds will be faster)
:embulkSetup
Setting Embulk version to 0.8.18
:embulk_new_java-file-input_xlsx
2017-03-21 04:12:05.020 +0900: Embulk v0.8.18
Creating embulk-input-xlsx/
Creating embulk-input-xlsx/README.md
Creating embulk-input-xlsx/LICENSE.txt
Creating embulk-input-xlsx/.gitignore
Creating embulk-input-xlsx/gradle/wrapper/gradle-wrapper.jar
Creating embulk-input-xlsx/gradle/wrapper/gradle-wrapper.properties
Creating embulk-input-xlsx/gradlew.bat
Creating embulk-input-xlsx/gradlew
Creating embulk-input-xlsx/config/checkstyle/checkstyle.xml
Creating embulk-input-xlsx/config/checkstyle/default.xml
Creating embulk-input-xlsx/build.gradle
Creating embulk-input-xlsx/lib/embulk/input/xlsx.rb
Creating embulk-input-xlsx/src/main/java/org/embulk/input/xlsx/XlsxFileInputPlugin.java
Creating embulk-input-xlsx/src/test/java/org/embulk/input/xlsx/TestXlsxFileInputPlugin.java
Plugin template is successfully generated.
Next steps:
$ cd embulk-input-xlsx
$ ./gradlew package
:newPlugin
BUILD SUCCESSFUL
Total time: 13.166 secs
```
## Dependencies
This plugin automatically adds the following dependency into your project.
- `org.embulk:embulk-core:`
## Tasks
- `newPlugin`: Generate a new plugin template
- `classpath`: Copy jar files to classpath directory
- `gemspec`: Generate a gemspec file for this plugin
- `gem`: Generate a gem file
- `package`: Generate a package, which is needed to run this plugin locally
- `checkstyle`: Run a Checkstyle process
- `gemPush`: Push gem file to rubygems.org
- `embulkSetup`: Install a version of Embulk, which you specified by `version`
- `embulk_#{command}`: Run an embulk command ([details](#embulk_command))
### embulk_${command}
You can run an embulk command with a gradle task `embulk_*`, which can be added command arguments with `_`.
Also, this plugin automatically sets some arguments when executing a command such as `run` or `guess`,
so you don't have to specify yaml path and package path by default.
#### Examples
- `(./gradlew|gradle) embulk_--version`
- This is equivalent to `embulk --version`
- `(./gradlew|gradle) embulk_run`
- This is equivalent to `embulk run config.yml -L `
- `(./gradlew|gradle) embulk_guess`
- This is equivalent to `embulk guess config.yml -o output.yml -L `
If you want to change `config.yml` or `output.yml` to other file, you can do it by passing a property `configYaml` or `outputYaml` such like following
```sh
$ ./gradlew embulk_guess -PconfigYaml=myconfig.yml -PoutputYaml=myoutput.yml
```