-
Notifications
You must be signed in to change notification settings - Fork 3
Backport to branch(3) : Add release flows for HashStore and TableStore #272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| apply plugin: 'maven-publish' | ||
|
|
||
| publishing { | ||
| publications { | ||
| mavenJava(MavenPublication) { | ||
| artifactId = 'scalardl-hashstore-java-client-sdk' | ||
| from components.java | ||
| artifact distTar | ||
| artifact distZip | ||
| artifact javadocJar | ||
| artifact sourcesJar | ||
| pom { | ||
| name = 'ScalarDL HashStore Java Client SDK' | ||
| description = 'A client-side Java library to interact with ScalarDL HashStore.' | ||
| url = 'https://github.com/scalar-labs/scalardl' | ||
| licenses { | ||
| license { | ||
| name = 'Apache License, Version 2.0' | ||
| url = 'http://www.apache.org/licenses/LICENSE-2.0' | ||
| } | ||
| } | ||
| developers { | ||
| developer { | ||
| id = 'hiroyuki' | ||
| name = 'Hiroyuki Yamada' | ||
| email = 'hiroyuki.yamada@scalar-labs.com' | ||
| } | ||
| developer { | ||
| id = 'jnmt' | ||
| name = 'Jun Nemoto' | ||
| email = 'jun.nemoto@scalar-labs.com' | ||
| } | ||
| } | ||
| scm { | ||
| connection = 'scm:git:https://github.com/scalar-labs/scalardl.git' | ||
| developerConnection = 'scm:git:https://github.com/scalar-labs/scalardl.git' | ||
| url = 'https://github.com/scalar-labs/scalardl' | ||
| } | ||
| } | ||
| } | ||
| } | ||
| repositories { | ||
| maven { | ||
| url = layout.buildDirectory.dir('staging-deploy') | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| apply plugin: 'maven-publish' | ||
|
|
||
| publishing { | ||
| publications { | ||
| mavenJava(MavenPublication) { | ||
| artifactId = 'scalardl-tablestore-java-client-sdk' | ||
| from components.java | ||
| artifact distTar | ||
| artifact distZip | ||
| artifact javadocJar | ||
| artifact sourcesJar | ||
| pom { | ||
| name = 'ScalarDL TableStore Java Client SDK' | ||
| description = 'A client-side Java library to interact with ScalarDL TableStore.' | ||
| url = 'https://github.com/scalar-labs/scalardl' | ||
| licenses { | ||
| license { | ||
| name = 'Apache License, Version 2.0' | ||
| url = 'http://www.apache.org/licenses/LICENSE-2.0' | ||
| } | ||
| } | ||
| developers { | ||
| developer { | ||
| id = 'hiroyuki' | ||
| name = 'Hiroyuki Yamada' | ||
| email = 'hiroyuki.yamada@scalar-labs.com' | ||
| } | ||
| developer { | ||
| id = 'jnmt' | ||
| name = 'Jun Nemoto' | ||
| email = 'jun.nemoto@scalar-labs.com' | ||
| } | ||
| } | ||
| scm { | ||
| connection = 'scm:git:https://github.com/scalar-labs/scalardl.git' | ||
| developerConnection = 'scm:git:https://github.com/scalar-labs/scalardl.git' | ||
| url = 'https://github.com/scalar-labs/scalardl' | ||
| } | ||
| } | ||
| } | ||
| } | ||
| repositories { | ||
| maven { | ||
| url = layout.buildDirectory.dir('staging-deploy') | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,7 +46,7 @@ dependencies { | |
|
|
||
| task TableStore(type: CreateStartScripts) { | ||
| mainClass = 'com.scalar.dl.tablestore.client.tool.TableStoreCommandLine' | ||
| applicationName = 'scalardl-table-store' | ||
| applicationName = 'scalardl-tablestore' | ||
| outputDir = new File(project.buildDir, 'tmp') | ||
| classpath = jar.outputs.files + project.configurations.runtimeClasspath | ||
| } | ||
|
|
@@ -101,3 +101,26 @@ task sourcesJar(type: Jar) { | |
| classifier = 'sources' | ||
| from sourceSets.main.allSource | ||
| } | ||
|
|
||
| javadoc { | ||
| title = "ScalarDL TableStore Java Client SDK ${version}" | ||
| source += sourceSets.main.java | ||
| source += project(':client').sourceSets.main.java | ||
| source += project(':common').sourceSets.main.java | ||
| include "com/scalar/dl/tablestore/**" | ||
| include "com/scalar/dl/client/exception/*.java" | ||
| include "com/scalar/dl/ledger/model/*.java" | ||
| } | ||
|
|
||
| distZip { | ||
| archiveFileName = "scalardl-tablestore-java-client-sdk-${project.version}.zip" | ||
| } | ||
|
|
||
| archivesBaseName = "scalardl-tablestore-java-client-sdk" | ||
|
|
||
| // for archiving and uploading to maven central | ||
| if (!project.gradle.startParameter.taskNames.isEmpty() && | ||
| (project.gradle.startParameter.taskNames[0].endsWith('publish') || | ||
| project.gradle.startParameter.taskNames[0].endsWith('publishToMavenLocal'))) { | ||
| apply from: 'archive.gradle' | ||
|
Comment on lines
+122
to
+125
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The condition To make this more robust, you should check if any of the requested tasks is a publish task. This will correctly detect the intention to publish regardless of other tasks on the command line. |
||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The condition
project.gradle.startParameter.taskNames[0].endsWith(...)is fragile. It only checks the first task specified on the command line. If other tasks are run before the publish task (e.g.,gradle clean publish), this condition will be false, and the publishing configuration will not be applied.To make this more robust, you should check if any of the requested tasks is a publish task. This will correctly detect the intention to publish regardless of other tasks on the command line.