diff --git a/build.gradle b/build.gradle index 12fafad..a4b93b3 100644 --- a/build.gradle +++ b/build.gradle @@ -3,13 +3,13 @@ plugins { id "checkstyle" id "maven-publish" id "org.embulk.embulk-plugins" version "0.4.2" + id "signing" } repositories { mavenCentral() - jcenter() } -group = "com.github.hiroyuki_sato" +group = "io.github.hiroyuki-sato" version = "0.4.0-SNAPSHOT" description = "Parses JSON files with JSONPath read by other file input plugins." @@ -17,10 +17,10 @@ sourceCompatibility = 1.8 targetCompatibility = 1.8 dependencies { - compileOnly "org.embulk:embulk-api:0.10.30" - compileOnly "org.embulk:embulk-spi:0.10.30" + compileOnly "org.embulk:embulk-api:0.10.31" + compileOnly "org.embulk:embulk-spi:0.10.31" - compile("org.embulk:embulk-util-config:0.2.1") { + compile("org.embulk:embulk-util-config:0.3.1") { // They conflict with embulk-core. They are once excluded here, // and added explicitly with versions exactly the same with embulk-core:0.10.19. exclude group: "com.fasterxml.jackson.core", module: "jackson-annotations" @@ -30,7 +30,7 @@ dependencies { exclude group: "javax.validation", module: "validation-api" } compile "org.embulk:embulk-util-timestamp:0.2.1" - compile('org.embulk:embulk-util-json:0.1.0') { + compile('org.embulk:embulk-util-json:0.1.1') { exclude group: "org.msgpack", module: "msgpack-core" } @@ -51,14 +51,14 @@ dependencies { compile "org.embulk:embulk-util-timestamp:0.2.1" testCompile "junit:junit:4.13.2" - testCompile "org.embulk:embulk-core:0.10.30" - testCompile "org.embulk:embulk-core:0.10.30:tests" + testCompile "org.embulk:embulk-core:0.10.31" + testCompile "org.embulk:embulk-core:0.10.31:tests" // 0.10.29 eliminates embulk-standards //testCompile "org.embulk:embulk-standards:0.10.29" // TODO: Remove them. // These `testCompile` are a tentative workaround. It will be covered in Embulk core's testing mechanism. - testCompile "org.embulk:embulk-deps:0.10.30" + testCompile "org.embulk:embulk-deps:0.10.31" } checkstyle { @@ -84,19 +84,6 @@ embulkPlugin { type = "jsonpath" } -publishing { - publications { - embulkPluginMaven(MavenPublication) { // Publish it with "publishEmbulkPluginMavenPublicationToMavenRepository". - from components.java // Must be "components.java". The dependency modification works only for it. - } - } - repositories { - maven { - url = "${project.buildDir}/mavenPublishLocal" - } - } -} - gem { authors = [ "Hiroyuki Sato","Takuma kanari" ] email = [ "hiroysato@gmail.com","chemtrails.t@gmail.com"] @@ -133,3 +120,84 @@ tasks.withType(JavaCompile) { test { maxHeapSize = "2g" } + +java { + withJavadocJar() + withSourcesJar() +} + +jar { + from rootProject.file("LICENSE.txt") +} + +sourcesJar { + from rootProject.file("LICENSE.txt") +} + +javadocJar { + from rootProject.file("LICENSE.txt") +} + +publishing { + publications { + maven(MavenPublication) { + groupId = project.group + artifactId = project.name + + from components.java // Must be "components.java". The dependency modification works only for it. + // javadocJar and sourcesJar are added by java.withJavadocJar() and java.withSourcesJar() above. + // See: https://docs.gradle.org/current/javadoc/org/gradle/api/plugins/JavaPluginExtension.html + + pom { // https://central.sonatype.org/pages/requirements.html + packaging "jar" + + name = project.name + description = project.description + url = "https://github.com/hiroyuki-sato/embulk-parser-jsonpath" + + licenses { + license { + // http://central.sonatype.org/pages/requirements.html#license-information + name = "MIT License" + url = "http://www.opensource.org/licenses/mit-license.php" + } + } + + developers { + developer { + name = "Hiroyuki Sato" + email = "hiroysato@gmail.com" + } + } + + scm { + connection = "scm:git:git://github.com/hiroyuki-sato/embulk-parser-jsonpath.git" + developerConnection = "scm:git:git@github.com:hiroyuki-sato/embulk-parser-jsonpath.git" + url = "https://github.com/hiroyuki-sato/embulk-parser-jsonpath" + } + } + } + } + + repositories { + maven { // publishMavenPublicationToMavenCentralRepository + name = "mavenCentral" + if (project.version.endsWith("-SNAPSHOT")) { + url "https://s01.oss.sonatype.org/content/repositories/snapshots" + } else { + url "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2" + } + + credentials { + username = project.hasProperty("ossrhUsername") ? ossrhUsername : "" + password = project.hasProperty("ossrhPassword") ? ossrhPassword : "" + } + } + } +} + +signing { + // https://docs.gradle.org/current/userguide/signing_plugin.html#sec:using_gpg_agent + useGpgCmd() + sign publishing.publications.maven +} diff --git a/gradle/dependency-locks/embulkPluginRuntime.lockfile b/gradle/dependency-locks/embulkPluginRuntime.lockfile index 70c94f7..5b44ad2 100644 --- a/gradle/dependency-locks/embulkPluginRuntime.lockfile +++ b/gradle/dependency-locks/embulkPluginRuntime.lockfile @@ -9,9 +9,9 @@ com.jayway.jsonpath:json-path:2.4.0 javax.validation:validation-api:1.1.0.Final net.minidev:accessors-smart:1.2 net.minidev:json-smart:2.3 -org.embulk:embulk-util-config:0.2.1 +org.embulk:embulk-util-config:0.3.1 org.embulk:embulk-util-file:0.1.3 -org.embulk:embulk-util-json:0.1.0 +org.embulk:embulk-util-json:0.1.1 org.embulk:embulk-util-rubytime:0.3.2 org.embulk:embulk-util-timestamp:0.2.1 org.ow2.asm:asm:5.0.4