Skip to content

Commit

Permalink
Merge pull request #13 from trocco-io/build-with-embulk-plugins
Browse files Browse the repository at this point in the history
build with embulk-plugins
  • Loading branch information
d-hrs authored Mar 7, 2023
2 parents 155df0b + 44df3eb commit b6f94f1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 44 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gem-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ jobs:
uses: trocco-io/push-gem-to-gpr-action@v1
with:
language: java
gem-path: "./pkg/*.gem"
gem-path: "./build/gems/*.gem"
github-token: "${{ secrets.GITHUB_TOKEN }}"
55 changes: 12 additions & 43 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
plugins {
id "org.embulk.embulk-plugins" version "0.5.5"
id "com.jfrog.bintray" version "1.1"
id "com.github.jruby-gradle.base" version "1.5.0"
id "java"
Expand Down Expand Up @@ -69,50 +70,18 @@ task checkstyle(type: Checkstyle) {
source = sourceSets.main.allJava + sourceSets.test.allJava
}

task gem(type: JRubyExec, dependsOn: ["gemspec", "classpath"]) {
jrubyArgs "-S"
script "gem"
scriptArgs "build", "${project.name}.gemspec"
doLast { ant.move(file: "${project.name}-${project.version}.gem", todir: "pkg") }
}

task gemPush(type: JRubyExec, dependsOn: ["gem"]) {
jrubyArgs "-S"
script "gem"
scriptArgs "push", "pkg/${project.name}-${project.version}.gem"
}

task "package"(dependsOn: ["gemspec", "classpath"]) {
doLast {
println "> Build succeeded."
println "> You can run embulk with '-L ${file(".").absolutePath}' argument."
}
embulkPlugin {
mainClass = "org.embulk.input.athena.AthenaInputPlugin"
category = "input"
type = "athena"
}

task gemspec {
ext.gemspecFile = file("${project.name}.gemspec")
inputs.file "build.gradle"
outputs.file gemspecFile
doLast { gemspecFile.write($/
Gem::Specification.new do |spec|
spec.name = "${project.name}"
spec.version = "${project.version}"
spec.authors = ["shinji19"]
spec.summary = %[Athena input plugin for Embulk]
spec.description = %[Loads records from Athena.]
spec.email = [""]
spec.licenses = ["MIT"]
spec.homepage = "https://github.com/shinji19/embulk-input-athena"

spec.files = `git ls-files`.split("\n") + Dir["classpath/*.jar"]
spec.test_files = spec.files.grep(%r"^(test|spec)/")
spec.require_paths = ["lib"]

#spec.add_dependency 'YOUR_GEM_DEPENDENCY', ['~> YOUR_GEM_DEPENDENCY_VERSION']
spec.add_development_dependency 'bundler', ['~> 1.0']
spec.add_development_dependency 'rake', ['>= 10.0']
end
/$)
}
gem {
from("LICENSE")
authors = [ "shinji19" ]
summary = "Athena input plugin for Embulk"
description = "Loads records from Athena."
homepage = "https://github.com/trocco-io/embulk-input-athena"
licenses = [ "MIT" ]
}
clean { delete "${project.name}.gemspec" }

0 comments on commit b6f94f1

Please sign in to comment.