Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CI

on:
push:
branches:
- "**"
pull_request:
branches:
- "**"

jobs:
test:
name: Test and Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up JDK 1.8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Run Spotless Check
run: ./gradlew spotlessCheck

- name: Run Tests
run: ./gradlew test

- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: build/reports/tests/test/
19 changes: 7 additions & 12 deletions .github/workflows/gem-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,8 @@ name: Ruby Gem
on:
workflow_dispatch:
push:
branches:
- "master"
tags:
- "*"
pull_request:
branches:
- "master"
types: [opened, synchronize]
- "v*"

jobs:
build:
Expand All @@ -20,14 +14,15 @@ jobs:
packages: write
contents: read
steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
- uses: actions/checkout@v2
- name: Set up Java8
uses: actions/setup-java@v2
with:
java-version: 1.8
distribution: "adopt"
java-version: "8"
- name: push gem
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 }}"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ build/

/.idea
*.iml
*.gemspec
2 changes: 0 additions & 2 deletions Gemfile

This file was deleted.

3 changes: 0 additions & 3 deletions Rakefile

This file was deleted.

98 changes: 42 additions & 56 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
plugins {
id "com.jfrog.bintray" version "1.1"
id "com.github.jruby-gradle.base" version "0.1.5"
id "org.embulk.embulk-plugins" version "0.6.2"
id "com.palantir.git-version" version "0.13.0"
id "java"
id "jacoco"
id "com.diffplug.spotless" version "6.11.0"
}
import com.github.jrubygradle.JRubyExec
repositories {
mavenCentral()
jcenter()
}
configurations {
provided
}

description = "JSONL parser plugin for Embulk"

version = {
def vd = versionDetails()
if (vd.commitDistance == 0 && vd.lastTag ==~ /^[0-9]+\.[0-9]+\.[0-9]+(\.[a-zA-Z0-9]+)?/) {
Expand All @@ -24,64 +21,53 @@ version = {
}()

compileJava.options.encoding = 'UTF-8' // source encoding
sourceCompatibility = 1.7
targetCompatibility = 1.7

dependencies {
compile "org.embulk:embulk-core:0.8.8"
provided "org.embulk:embulk-core:0.8.8"
sourceCompatibility = 1.8
targetCompatibility = 1.8

testCompile "junit:junit:4.+"
testCompile "org.embulk:embulk-core:0.8.8:tests"
testCompile "org.embulk:embulk-standards:0.8.8"
embulkPlugin {
mainClass = "org.embulk.parser.jsonl.JsonlParserPlugin"
category = "parser"
type = "jsonl"
}

task classpath(type: Copy, dependsOn: ["jar"]) {
doFirst { file("classpath").deleteDir() }
from (configurations.runtime - configurations.provided + files(jar.archivePath))
into "classpath"
gem {
authors = ["Shunsuke Mikami"]
email = ["shun0102@gmail.com"]
summary = "Jsonl parser plugin for Embulk"
homepage = "https://github.com/shun0102/embulk-parser-jsonl"
licenses = ["MIT"]
}
clean { delete "classpath" }

task gem(type: JRubyExec, dependsOn: ["gemspec", "classpath"]) {
jrubyArgs "-rrubygems/gem_runner", "-eGem::GemRunner.new.run(ARGV)", "build"
script "${project.name}.gemspec"
doLast { ant.move(file: "${project.name}-${project.version}.gem", todir: "pkg") }
}
dependencies {
compileOnly "org.embulk:embulk-api:0.10.43"
compileOnly "org.embulk:embulk-spi:0.11"

task gemPush(type: JRubyExec, dependsOn: ["gem"]) {
jrubyArgs "-rrubygems/gem_runner", "-eGem::GemRunner.new.run(ARGV)", "push"
script "pkg/${project.name}-${project.version}.gem"
}
implementation "org.embulk:embulk-util-config:0.3.4"
implementation "org.embulk:embulk-util-json:0.3.0"
implementation "org.embulk:embulk-util-timestamp:0.2.2"
implementation "org.embulk:embulk-util-text:0.1.1"

task "package"(dependsOn: ["gemspec", "classpath"]) << {
println "> Build succeeded."
println "> You can run embulk with '-L ${file(".").absolutePath}' argument."
testImplementation "junit:junit:4.+"
testImplementation "org.embulk:embulk-api:0.10.43"
testImplementation "org.embulk:embulk-spi:0.11"
testImplementation "org.embulk:embulk-junit4:0.11.5"
testImplementation "org.embulk:embulk-util-config:0.3.4"
testImplementation "org.embulk:embulk-deps:0.11.5"
}

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 = ["Shunsuke Mikami"]
spec.summary = "Jsonl parser plugin for Embulk"
spec.description = "Parses Jsonl files read by other file input plugins."
spec.email = ["shun0102@gmail.com"]
spec.licenses = ["MIT"]
spec.homepage = "https://github.com/shun0102/embulk-parser-jsonl"

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_development_dependency 'bundler', ['~> 1.0']
spec.add_development_dependency 'rake', ['~> 10.0']
end
/$)
spotless {
java {
importOrder()
removeUnusedImports()
googleJavaFormat()
}
}
clean { delete "${project.name}.gemspec" }

dependencyLocking {
lockAllConfigurations()
}

tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:deprecation"
}
18 changes: 0 additions & 18 deletions embulk-parser-jsonl.gemspec

This file was deleted.

19 changes: 19 additions & 0 deletions gradle.lockfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
com.fasterxml.jackson.core:jackson-annotations:2.6.7=compileClasspath,runtimeClasspath
com.fasterxml.jackson.core:jackson-core:2.6.7=compileClasspath,runtimeClasspath
com.fasterxml.jackson.core:jackson-databind:2.6.7.5=compileClasspath,runtimeClasspath
com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.6.7=compileClasspath,runtimeClasspath
javax.validation:validation-api:1.1.0.Final=compileClasspath,runtimeClasspath
org.embulk:embulk-api:0.10.43=compileClasspath
org.embulk:embulk-spi:0.11=compileClasspath
org.embulk:embulk-util-config:0.3.4=compileClasspath,runtimeClasspath
org.embulk:embulk-util-file:0.1.3=compileClasspath,runtimeClasspath
org.embulk:embulk-util-json:0.3.0=compileClasspath,runtimeClasspath
org.embulk:embulk-util-rubytime:0.3.3=compileClasspath,runtimeClasspath
org.embulk:embulk-util-text:0.1.1=compileClasspath,runtimeClasspath
org.embulk:embulk-util-timestamp:0.2.2=compileClasspath,runtimeClasspath
org.msgpack:msgpack-core:0.8.24=compileClasspath
org.slf4j:slf4j-api:2.0.7=compileClasspath
empty=
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Tue Aug 11 00:26:20 PDT 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
58 changes: 0 additions & 58 deletions lib/embulk/guess/jsonl.rb

This file was deleted.

3 changes: 0 additions & 3 deletions lib/embulk/parser/jsonl.rb

This file was deleted.

Loading
Loading