./gradlew wrapper --gradle-version=6.01
dependencies {
// compile "org.embulk:embulk-core:0.9.7"
// provided "org.embulk:embulk-core:0.9.7"
compileOnly "org.embulk:embulk-core:0.9.23"
compile 'com.jayway.jsonpath:json-path:2.2.0'
testCompile "junit:junit:4.+"
testCompile "org.embulk:embulk-core:0.9.23:tests"
testCompile "org.embulk:embulk-standards:0.9.23"
testCompile "org.embulk:embulk-deps-buffer:0.9.23"
testCompile "org.embulk:embulk-deps-config:0.9.23"
}
- compileOnly と書くのは、embulkのところだけ?、
json-path
もcompileOnlyと書くべき? - testCompileのバージョンは0.9.23とかで統一した方が良い?(READMEはembulk-deps-bufferは0.9.22, deps-configは0.9.23になっている)
こう出たら、compileをcompileOnlyに変えて、./gradlew dependencies --write-locks
を実行すれば良いのかな?
============================================ WARNING ============================================
Following "runtime" dependencies are included also in "compileOnly" dependencies.
"org.slf4j:slf4j-api:1.7.16"
"compileOnly" dependencies are used to represent Embulk's core to be "provided" at runtime.
They should be excluded from "compile" or "runtime" dependencies like the example below.
dependencies {
compile("org.glassfish.jersey.core:jersey-client:2.25.1") {
exclude group: "javax.inject", module: "javax.inject"
}
}
=================================================================================================
上記警告が出る時
dependencies {
// compile "org.embulk:embulk-core:0.9.7"
// provided "org.embulk:embulk-core:0.9.7"
compileOnly "org.embulk:embulk-core:0.9.23"
compile 'com.jayway.jsonpath:json-path:2.2.0'
testCompile "junit:junit:4.+"
testCompile "org.embulk:embulk-core:0.9.23:tests"
testCompile "org.embulk:embulk-standards:0.9.23"
testCompile "org.embulk:embulk-deps-buffer:0.9.23"
testCompile "org.embulk:embulk-deps-config:0.9.23"
}
gemの依存関係は、gem {}
ないにどう書けば良いのかな。
spec.add_development_dependency 'bundler', ['~> 1.0']
spec.add_development_dependency 'rake', ['>= 10.0']
spec.add_dependency 'jsonpath', ['~> 0.5.8'] # for guess
spec.add_dependency 'json', ['~> 2.0.2'] # for guess
gem {
//from("LICENSE") // Optional -- if you need other files in the gem.
authors = ["Hiroyuki Sato","Takuma kanari"]
email = [ "hiroysato@gmail.com","chemtrails.t@gmail.com"]
// "description" of the gem is copied from "description" of your Gradle project.
summary = "Example input plugin for Embulk"
homepage = "https://github.com/hiroyuki-sato/embulk-parser-jsonpath"
licenses = [ "MIT" ]
}
compileOnly
は、独自定義だったprovided
を Gradle 標準の記述compileOnly
で置き換えているものです。通常の場合はembulk-core
だけが対象になると思います。0.9.22
には0.9.22
を、0.9.23
には0.9.23
を対応させていると思います。./gradlew dependencies --write-locks
とその warning は関係ありません (dependency lock から外れたときには別のエラーが出てビルド失敗します)Following "runtime" dependencies are included also...
の warning は「embulk-core
に入っている dependency library を、別のライブラリ (この場合json-path
しかないのでそれ) でも使ってしまっている」ことを意味します。embulk-core
にもう入っているslf4j-api
が、プラグイン側にも重複して入ってしまうことになります。これは問題を引き起こすことがあるため、警告しています。json-path
しかないので、このjson-path
がslf4j-api
を巻き込んでしまっていることになります。