chore: add repo common files
diff --git a/java-core/.github/ISSUE_TEMPLATE/bug_report.md b/java-core/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..d81d43b --- /dev/null +++ b/java-core/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,51 @@ +--- +name: Bug report +about: Create a report to help us improve + +--- + +Thanks for stopping by to let us know something could be better! + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. + +Please run down the following list and make sure you've tried the usual "quick fixes": + + - Search the issues already opened: https://github.com/googleapis/google-cloud-core/issues + - Check for answers on StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform + +If you are still having issues, please include as much information as possible: + +#### Environment details + +1. Specify the API at the beginning of the title. For example, "BigQuery: ..."). + General, Core, and Other are also allowed as types +2. OS type and version: +3. Java version: +4. google-cloud-core version(s): + +#### Steps to reproduce + + 1. ? + 2. ? + +#### Code example + +```java +// example +``` + +#### Stack trace +``` +Any relevant stacktrace here. +``` + +#### External references such as API reference guides + +- ? + +#### Any additional information below + + +Following these steps guarantees the quickest resolution possible. + +Thanks! \ No newline at end of file
diff --git a/java-core/.github/ISSUE_TEMPLATE/feature_request.md b/java-core/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..754e30c --- /dev/null +++ b/java-core/.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,21 @@ +--- +name: Feature request +about: Suggest an idea for this library + +--- + +Thanks for stopping by to let us know something could be better! + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. + +**Is your feature request related to a problem? Please describe.** +What the problem is. Example: I'm always frustrated when [...] + +**Describe the solution you'd like** +What you want to happen. + +**Describe alternatives you've considered** +Any alternative solutions or features you've considered. + +**Additional context** +Any other context or screenshots about the feature request.
diff --git a/java-core/.github/ISSUE_TEMPLATE/support_request.md b/java-core/.github/ISSUE_TEMPLATE/support_request.md new file mode 100644 index 0000000..9958690 --- /dev/null +++ b/java-core/.github/ISSUE_TEMPLATE/support_request.md
@@ -0,0 +1,7 @@ +--- +name: Support request +about: If you have a support contract with Google, please create an issue in the Google Cloud Support console. + +--- + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.
diff --git a/java-core/.github/PULL_REQUEST_TEMPLATE.md b/java-core/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..0bd0ee0 --- /dev/null +++ b/java-core/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1 @@ +Fixes #<issue_number_goes_here> (it's a good idea to open an issue first for context and/or discussion) \ No newline at end of file
diff --git a/java-core/.gitignore b/java-core/.gitignore new file mode 100644 index 0000000..fadd6af --- /dev/null +++ b/java-core/.gitignore
@@ -0,0 +1,15 @@ +# Maven +target/ + +# Eclipse +.classpath +.project +.settings + +# Intellij +*.iml +.idea/ + +# python utilities +*.pyc +__pycache__
diff --git a/java-core/.kokoro/build.bat b/java-core/.kokoro/build.bat new file mode 100644 index 0000000..bcca1f4 --- /dev/null +++ b/java-core/.kokoro/build.bat
@@ -0,0 +1,3 @@ +:: See documentation in type-shell-output.bat + +"C:\Program Files\Git\bin\bash.exe" github/java-core/.kokoro/build.sh
diff --git a/java-core/.kokoro/build.sh b/java-core/.kokoro/build.sh new file mode 100755 index 0000000..2ffb5ef --- /dev/null +++ b/java-core/.kokoro/build.sh
@@ -0,0 +1,54 @@ +#!/bin/bash +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +## Get the directory of the build script +scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) +## cd to the parent directory, i.e. the root of the git repo +cd ${scriptDir}/.. + +# Print out Java version +java -version +echo ${JOB_TYPE} + +mvn install -B -V \ + -DskipTests=true \ + -Dmaven.javadoc.skip=true \ + -Dgcloud.download.skip=true \ + -T 1C + +# if GOOGLE_APPLICATION_CREDIENTIALS is specified as a relative path prepend Kokoro root directory onto it +if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTIALS}" != /* ]]; then + export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_ROOT}/src/${GOOGLE_APPLICATION_CREDENTIALS}) +fi + +case ${JOB_TYPE} in +test) + mvn test -B + bash ${KOKORO_GFILE_DIR}/codecov.sh + ;; +lint) + mvn com.coveo:fmt-maven-plugin:check + ;; +javadoc) + mvn javadoc:javadoc javadoc:test-javadoc + ;; +integration) + mvn -B ${INTEGRATION_TEST_ARGS} -DtrimStackTrace=false -fae verify + ;; +*) + ;; +esac \ No newline at end of file
diff --git a/java-core/.kokoro/common.cfg b/java-core/.kokoro/common.cfg new file mode 100644 index 0000000..054c30c --- /dev/null +++ b/java-core/.kokoro/common.cfg
@@ -0,0 +1,13 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Download trampoline resources. These will be in ${KOKORO_GFILE_DIR} +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# All builds use the trampoline script to run in docker. +build_file: "java-core/.kokoro/trampoline.sh" + +# Tell the trampoline which build file to use. +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-core/.kokoro/build.sh" +}
diff --git a/java-core/.kokoro/continuous/common.cfg b/java-core/.kokoro/continuous/common.cfg new file mode 100644 index 0000000..af5a907 --- /dev/null +++ b/java-core/.kokoro/continuous/common.cfg
@@ -0,0 +1,24 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "java-core/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-core/.kokoro/build.sh" +} + +env_vars: { + key: "JOB_TYPE" + value: "test" +}
diff --git a/java-core/.kokoro/continuous/dependencies.cfg b/java-core/.kokoro/continuous/dependencies.cfg new file mode 100644 index 0000000..895832a --- /dev/null +++ b/java-core/.kokoro/continuous/dependencies.cfg
@@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-core/.kokoro/dependencies.sh" +}
diff --git a/java-core/.kokoro/continuous/integration.cfg b/java-core/.kokoro/continuous/integration.cfg new file mode 100644 index 0000000..3b017fc --- /dev/null +++ b/java-core/.kokoro/continuous/integration.cfg
@@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +}
diff --git a/java-core/.kokoro/continuous/java11.cfg b/java-core/.kokoro/continuous/java11.cfg new file mode 100644 index 0000000..709f2b4 --- /dev/null +++ b/java-core/.kokoro/continuous/java11.cfg
@@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" +}
diff --git a/java-core/.kokoro/continuous/java7.cfg b/java-core/.kokoro/continuous/java7.cfg new file mode 100644 index 0000000..cb24f44 --- /dev/null +++ b/java-core/.kokoro/continuous/java7.cfg
@@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java7" +}
diff --git a/java-core/.kokoro/continuous/java8-osx.cfg b/java-core/.kokoro/continuous/java8-osx.cfg new file mode 100644 index 0000000..8b617e2 --- /dev/null +++ b/java-core/.kokoro/continuous/java8-osx.cfg
@@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-core/.kokoro/build.sh"
diff --git a/java-core/.kokoro/continuous/java8-win.cfg b/java-core/.kokoro/continuous/java8-win.cfg new file mode 100644 index 0000000..1a6311a --- /dev/null +++ b/java-core/.kokoro/continuous/java8-win.cfg
@@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-core/.kokoro/build.bat"
diff --git a/java-core/.kokoro/continuous/java8.cfg b/java-core/.kokoro/continuous/java8.cfg new file mode 100644 index 0000000..3b017fc --- /dev/null +++ b/java-core/.kokoro/continuous/java8.cfg
@@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +}
diff --git a/java-core/.kokoro/continuous/lint.cfg b/java-core/.kokoro/continuous/lint.cfg new file mode 100644 index 0000000..6d323c8 --- /dev/null +++ b/java-core/.kokoro/continuous/lint.cfg
@@ -0,0 +1,13 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. + +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "lint" +} \ No newline at end of file
diff --git a/java-core/.kokoro/continuous/propose_release.cfg b/java-core/.kokoro/continuous/propose_release.cfg new file mode 100644 index 0000000..fc798ae --- /dev/null +++ b/java-core/.kokoro/continuous/propose_release.cfg
@@ -0,0 +1,53 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "java-core/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-core/.kokoro/continuous/propose_release.sh" +} + +# tokens used by release-please to keep an up-to-date release PR. +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-key-release-please" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-token-release-please" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-url-release-please" + } + } +}
diff --git a/java-core/.kokoro/continuous/propose_release.sh b/java-core/.kokoro/continuous/propose_release.sh new file mode 100755 index 0000000..1fd8acb --- /dev/null +++ b/java-core/.kokoro/continuous/propose_release.sh
@@ -0,0 +1,29 @@ +#!/bin/bash + +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +export NPM_CONFIG_PREFIX=/home/node/.npm-global + +if [ -f ${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please ]; then + # Groom the release PR as new commits are merged. + npx release-please release-pr --token=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-token-release-please \ + --repo-url=googleapis/java-core \ + --package-name="google-cloud-core" \ + --api-url=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please \ + --proxy-key=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-key-release-please \ + --release-type=java-yoshi +fi
diff --git a/java-core/.kokoro/dependencies.sh b/java-core/.kokoro/dependencies.sh new file mode 100755 index 0000000..51e976d --- /dev/null +++ b/java-core/.kokoro/dependencies.sh
@@ -0,0 +1,27 @@ +#!/bin/bash +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +cd github/java-core/ + +# Print out Java +java -version +echo $JOB_TYPE + +export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" + +mvn install -DskipTests=true -B -V +mvn -B dependency:analyze -DfailOnWarning=true
diff --git a/java-core/.kokoro/linkage-monitor.sh b/java-core/.kokoro/linkage-monitor.sh new file mode 100755 index 0000000..ec3da4e --- /dev/null +++ b/java-core/.kokoro/linkage-monitor.sh
@@ -0,0 +1,33 @@ +#!/bin/bash +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail +# Display commands being run. +set -x + +cd github/java-core/ + +# Print out Java version +java -version +echo ${JOB_TYPE} + +mvn install -DskipTests=true -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V + +# Kokoro job cloud-opensource-java/ubuntu/linkage-monitor-gcs creates this JAR +JAR=linkage-monitor-latest-all-deps.jar +curl -v -O "https://storage.googleapis.com/cloud-opensource-java-linkage-monitor/${JAR}" + +# Fails if there's new linkage errors compared with baseline +java -jar ${JAR} com.google.cloud:libraries-bom
diff --git a/java-core/.kokoro/nightly/common.cfg b/java-core/.kokoro/nightly/common.cfg new file mode 100644 index 0000000..af5a907 --- /dev/null +++ b/java-core/.kokoro/nightly/common.cfg
@@ -0,0 +1,24 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "java-core/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-core/.kokoro/build.sh" +} + +env_vars: { + key: "JOB_TYPE" + value: "test" +}
diff --git a/java-core/.kokoro/nightly/dependencies.cfg b/java-core/.kokoro/nightly/dependencies.cfg new file mode 100644 index 0000000..895832a --- /dev/null +++ b/java-core/.kokoro/nightly/dependencies.cfg
@@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-core/.kokoro/dependencies.sh" +}
diff --git a/java-core/.kokoro/nightly/integration.cfg b/java-core/.kokoro/nightly/integration.cfg new file mode 100644 index 0000000..3b017fc --- /dev/null +++ b/java-core/.kokoro/nightly/integration.cfg
@@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +}
diff --git a/java-core/.kokoro/nightly/java11.cfg b/java-core/.kokoro/nightly/java11.cfg new file mode 100644 index 0000000..709f2b4 --- /dev/null +++ b/java-core/.kokoro/nightly/java11.cfg
@@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" +}
diff --git a/java-core/.kokoro/nightly/java7.cfg b/java-core/.kokoro/nightly/java7.cfg new file mode 100644 index 0000000..cb24f44 --- /dev/null +++ b/java-core/.kokoro/nightly/java7.cfg
@@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java7" +}
diff --git a/java-core/.kokoro/nightly/java8-osx.cfg b/java-core/.kokoro/nightly/java8-osx.cfg new file mode 100644 index 0000000..8b617e2 --- /dev/null +++ b/java-core/.kokoro/nightly/java8-osx.cfg
@@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-core/.kokoro/build.sh"
diff --git a/java-core/.kokoro/nightly/java8-win.cfg b/java-core/.kokoro/nightly/java8-win.cfg new file mode 100644 index 0000000..1a6311a --- /dev/null +++ b/java-core/.kokoro/nightly/java8-win.cfg
@@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-core/.kokoro/build.bat"
diff --git a/java-core/.kokoro/nightly/java8.cfg b/java-core/.kokoro/nightly/java8.cfg new file mode 100644 index 0000000..3b017fc --- /dev/null +++ b/java-core/.kokoro/nightly/java8.cfg
@@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +}
diff --git a/java-core/.kokoro/nightly/lint.cfg b/java-core/.kokoro/nightly/lint.cfg new file mode 100644 index 0000000..6d323c8 --- /dev/null +++ b/java-core/.kokoro/nightly/lint.cfg
@@ -0,0 +1,13 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. + +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "lint" +} \ No newline at end of file
diff --git a/java-core/.kokoro/presubmit/common.cfg b/java-core/.kokoro/presubmit/common.cfg new file mode 100644 index 0000000..4ba4e25 --- /dev/null +++ b/java-core/.kokoro/presubmit/common.cfg
@@ -0,0 +1,33 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "java-core/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-core/.kokoro/build.sh" +} + +env_vars: { + key: "JOB_TYPE" + value: "test" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "dpebot_codecov_token" + } + } +}
diff --git a/java-core/.kokoro/presubmit/dependencies.cfg b/java-core/.kokoro/presubmit/dependencies.cfg new file mode 100644 index 0000000..895832a --- /dev/null +++ b/java-core/.kokoro/presubmit/dependencies.cfg
@@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-core/.kokoro/dependencies.sh" +}
diff --git a/java-core/.kokoro/presubmit/integration.cfg b/java-core/.kokoro/presubmit/integration.cfg new file mode 100644 index 0000000..3b017fc --- /dev/null +++ b/java-core/.kokoro/presubmit/integration.cfg
@@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +}
diff --git a/java-core/.kokoro/presubmit/java11.cfg b/java-core/.kokoro/presubmit/java11.cfg new file mode 100644 index 0000000..709f2b4 --- /dev/null +++ b/java-core/.kokoro/presubmit/java11.cfg
@@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" +}
diff --git a/java-core/.kokoro/presubmit/java7.cfg b/java-core/.kokoro/presubmit/java7.cfg new file mode 100644 index 0000000..cb24f44 --- /dev/null +++ b/java-core/.kokoro/presubmit/java7.cfg
@@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java7" +}
diff --git a/java-core/.kokoro/presubmit/java8-osx.cfg b/java-core/.kokoro/presubmit/java8-osx.cfg new file mode 100644 index 0000000..8b617e2 --- /dev/null +++ b/java-core/.kokoro/presubmit/java8-osx.cfg
@@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-core/.kokoro/build.sh"
diff --git a/java-core/.kokoro/presubmit/java8-win.cfg b/java-core/.kokoro/presubmit/java8-win.cfg new file mode 100644 index 0000000..1a6311a --- /dev/null +++ b/java-core/.kokoro/presubmit/java8-win.cfg
@@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-core/.kokoro/build.bat"
diff --git a/java-core/.kokoro/presubmit/java8.cfg b/java-core/.kokoro/presubmit/java8.cfg new file mode 100644 index 0000000..3b017fc --- /dev/null +++ b/java-core/.kokoro/presubmit/java8.cfg
@@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +}
diff --git a/java-core/.kokoro/presubmit/linkage-monitor.cfg b/java-core/.kokoro/presubmit/linkage-monitor.cfg new file mode 100644 index 0000000..8703ea2 --- /dev/null +++ b/java-core/.kokoro/presubmit/linkage-monitor.cfg
@@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-core/.kokoro/linkage-monitor.sh" +} \ No newline at end of file
diff --git a/java-core/.kokoro/presubmit/lint.cfg b/java-core/.kokoro/presubmit/lint.cfg new file mode 100644 index 0000000..6d323c8 --- /dev/null +++ b/java-core/.kokoro/presubmit/lint.cfg
@@ -0,0 +1,13 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. + +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "lint" +} \ No newline at end of file
diff --git a/java-core/.kokoro/release/bump_snapshot.cfg b/java-core/.kokoro/release/bump_snapshot.cfg new file mode 100644 index 0000000..a27810a --- /dev/null +++ b/java-core/.kokoro/release/bump_snapshot.cfg
@@ -0,0 +1,53 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "java-core/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-core/.kokoro/release/bump_snapshot.sh" +} + +# tokens used by release-please to keep an up-to-date release PR. +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-key-release-please" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-token-release-please" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-url-release-please" + } + } +}
diff --git a/java-core/.kokoro/release/bump_snapshot.sh b/java-core/.kokoro/release/bump_snapshot.sh new file mode 100755 index 0000000..712ce36 --- /dev/null +++ b/java-core/.kokoro/release/bump_snapshot.sh
@@ -0,0 +1,30 @@ +#!/bin/bash + +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +export NPM_CONFIG_PREFIX=/home/node/.npm-global + +if [ -f ${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please ]; then + # Groom the snapshot release PR immediately after publishing a release + npx release-please release-pr --token=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-token-release-please \ + --repo-url=googleapis/java-core \ + --package-name="google-cloud-core" \ + --api-url=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please \ + --proxy-key=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-key-release-please \ + --snapshot \ + --release-type=java-auth-yoshi +fi
diff --git a/java-core/.kokoro/release/common.cfg b/java-core/.kokoro/release/common.cfg new file mode 100644 index 0000000..4b5b862 --- /dev/null +++ b/java-core/.kokoro/release/common.cfg
@@ -0,0 +1,49 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "java-core/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "maven-gpg-keyring" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "maven-gpg-passphrase" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "maven-gpg-pubkeyring" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "sonatype-credentials" + } + } +}
diff --git a/java-core/.kokoro/release/common.sh b/java-core/.kokoro/release/common.sh new file mode 100755 index 0000000..6e3f659 --- /dev/null +++ b/java-core/.kokoro/release/common.sh
@@ -0,0 +1,50 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +# Get secrets from keystore and set and environment variables +setup_environment_secrets() { + export GPG_PASSPHRASE=$(cat ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-passphrase) + export GPG_TTY=$(tty) + export GPG_HOMEDIR=/gpg + mkdir $GPG_HOMEDIR + mv ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-pubkeyring $GPG_HOMEDIR/pubring.gpg + mv ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-keyring $GPG_HOMEDIR/secring.gpg + export SONATYPE_USERNAME=$(cat ${KOKORO_KEYSTORE_DIR}/70247_sonatype-credentials | cut -f1 -d'|') + export SONATYPE_PASSWORD=$(cat ${KOKORO_KEYSTORE_DIR}/70247_sonatype-credentials | cut -f2 -d'|') +} + +create_settings_xml_file() { + echo "<settings> + <servers> + <server> + <id>ossrh</id> + <username>${SONATYPE_USERNAME}</username> + <password>${SONATYPE_PASSWORD}</password> + </server> + <server> + <id>sonatype-nexus-staging</id> + <username>${SONATYPE_USERNAME}</username> + <password>${SONATYPE_PASSWORD}</password> + </server> + <server> + <id>sonatype-nexus-snapshots</id> + <username>${SONATYPE_USERNAME}</username> + <password>${SONATYPE_PASSWORD}</password> + </server> + </servers> +</settings>" > $1 +} \ No newline at end of file
diff --git a/java-core/.kokoro/release/drop.cfg b/java-core/.kokoro/release/drop.cfg new file mode 100644 index 0000000..211c014 --- /dev/null +++ b/java-core/.kokoro/release/drop.cfg
@@ -0,0 +1,9 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-core/.kokoro/release/drop.sh" +} + +# Download staging properties file. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/java/releases/java-core" \ No newline at end of file
diff --git a/java-core/.kokoro/release/drop.sh b/java-core/.kokoro/release/drop.sh new file mode 100755 index 0000000..5c4551e --- /dev/null +++ b/java-core/.kokoro/release/drop.sh
@@ -0,0 +1,32 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +# STAGING_REPOSITORY_ID must be set +if [ -z "${STAGING_REPOSITORY_ID}" ]; then + echo "Missing STAGING_REPOSITORY_ID environment variable" + exit 1 +fi + +source $(dirname "$0")/common.sh +pushd $(dirname "$0")/../../ + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +mvn nexus-staging:drop -B \ + --settings=settings.xml \ + -DstagingRepositoryId=${STAGING_REPOSITORY_ID}
diff --git a/java-core/.kokoro/release/promote.cfg b/java-core/.kokoro/release/promote.cfg new file mode 100644 index 0000000..b3fc201 --- /dev/null +++ b/java-core/.kokoro/release/promote.cfg
@@ -0,0 +1,10 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-core/.kokoro/release/promote.sh" +} + +# Download staging properties file. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/java/releases/java-core" +
diff --git a/java-core/.kokoro/release/promote.sh b/java-core/.kokoro/release/promote.sh new file mode 100755 index 0000000..1fa95fa --- /dev/null +++ b/java-core/.kokoro/release/promote.sh
@@ -0,0 +1,34 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +# STAGING_REPOSITORY_ID must be set +if [ -z "${STAGING_REPOSITORY_ID}" ]; then + echo "Missing STAGING_REPOSITORY_ID environment variable" + exit 1 +fi + +source $(dirname "$0")/common.sh + +pushd $(dirname "$0")/../../ + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +mvn nexus-staging:release -B \ + -DperformRelease=true \ + --settings=settings.xml \ + -DstagingRepositoryId=${STAGING_REPOSITORY_ID}
diff --git a/java-core/.kokoro/release/publish_javadoc.cfg b/java-core/.kokoro/release/publish_javadoc.cfg new file mode 100644 index 0000000..166868b --- /dev/null +++ b/java-core/.kokoro/release/publish_javadoc.cfg
@@ -0,0 +1,19 @@ +# Format: //devtools/kokoro/config/proto/build.proto +env_vars: { + key: "STAGING_BUCKET" + value: "docs-staging" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-core/.kokoro/release/publish_javadoc.sh" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "docuploader_service_account" + } + } +}
diff --git a/java-core/.kokoro/release/publish_javadoc.sh b/java-core/.kokoro/release/publish_javadoc.sh new file mode 100755 index 0000000..3eb587a --- /dev/null +++ b/java-core/.kokoro/release/publish_javadoc.sh
@@ -0,0 +1,55 @@ +#!/bin/bash +# Copyright 2019 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +if [[ -z "${CREDENTIALS}" ]]; then + CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account +fi + +if [[ -z "${STAGING_BUCKET}" ]]; then + echo "Need to set STAGING_BUCKET environment variable" + exit 1 +fi + +# work from the git root directory +pushd $(dirname "$0")/../../ + +# install docuploader package +python3 -m pip install gcp-docuploader + +# compile all packages +mvn clean install -B -DskipTests=true + +NAME=google-cloud-core +VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) + +# build the docs +mvn site -B + +pushd target/site/apidocs + +# create metadata +python3 -m docuploader create-metadata \ + --name ${NAME} \ + --version ${VERSION} \ + --language java + +# upload docs +python3 -m docuploader upload . \ + --credentials ${CREDENTIALS} \ + --staging-bucket ${STAGING_BUCKET} + +popd
diff --git a/java-core/.kokoro/release/snapshot.cfg b/java-core/.kokoro/release/snapshot.cfg new file mode 100644 index 0000000..d435702 --- /dev/null +++ b/java-core/.kokoro/release/snapshot.cfg
@@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-core/.kokoro/release/snapshot.sh" +} \ No newline at end of file
diff --git a/java-core/.kokoro/release/snapshot.sh b/java-core/.kokoro/release/snapshot.sh new file mode 100755 index 0000000..bf738c5 --- /dev/null +++ b/java-core/.kokoro/release/snapshot.sh
@@ -0,0 +1,30 @@ +#!/bin/bash +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +source $(dirname "$0")/common.sh +MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml +pushd $(dirname "$0")/../../ + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +mvn clean install deploy -B \ + --settings ${MAVEN_SETTINGS_FILE} \ + -DperformRelease=true \ + -Dgpg.executable=gpg \ + -Dgpg.passphrase=${GPG_PASSPHRASE} \ + -Dgpg.homedir=${GPG_HOMEDIR} \ No newline at end of file
diff --git a/java-core/.kokoro/release/stage.cfg b/java-core/.kokoro/release/stage.cfg new file mode 100644 index 0000000..7d8a196 --- /dev/null +++ b/java-core/.kokoro/release/stage.cfg
@@ -0,0 +1,44 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-core/.kokoro/release/stage.sh" +} + +# Need to save the properties file +action { + define_artifacts { + regex: "github/java-core/target/nexus-staging/staging/*.properties" + strip_prefix: "github/java-core" + } +} + +# Fetch the token needed for reporting release status to GitHub +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "yoshi-automation-github-key" + } + } +} + +# Fetch magictoken to use with Magic Github Proxy +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "releasetool-magictoken" + } + } +} + +# Fetch api key to use with Magic Github Proxy +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "magic-github-proxy-api-key" + } + } +}
diff --git a/java-core/.kokoro/release/stage.sh b/java-core/.kokoro/release/stage.sh new file mode 100755 index 0000000..b1b1b01 --- /dev/null +++ b/java-core/.kokoro/release/stage.sh
@@ -0,0 +1,41 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +# Start the releasetool reporter +python3 -m pip install gcp-releasetool +python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script + +source $(dirname "$0")/common.sh +MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml +pushd $(dirname "$0")/../../ + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +mvn clean install deploy -B \ + --settings ${MAVEN_SETTINGS_FILE} \ + -DperformRelease=true \ + -Dgpg.executable=gpg \ + -Dgpg.passphrase=${GPG_PASSPHRASE} \ + -Dgpg.homedir=${GPG_HOMEDIR} + +if [[ -n "${AUTORELEASE_PR}" ]] +then + mvn nexus-staging:release -B \ + -DperformRelease=true \ + --settings=settings.xml +fi \ No newline at end of file
diff --git a/java-core/.kokoro/trampoline.sh b/java-core/.kokoro/trampoline.sh new file mode 100644 index 0000000..ba17ce0 --- /dev/null +++ b/java-core/.kokoro/trampoline.sh
@@ -0,0 +1,24 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +set -eo pipefail +# Always run the cleanup script, regardless of the success of bouncing into +# the container. +function cleanup() { + chmod +x ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh + ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh + echo "cleanup"; +} +trap cleanup EXIT +python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py"
diff --git a/java-core/.repo-metadata.json b/java-core/.repo-metadata.json new file mode 100644 index 0000000..e3e8849 --- /dev/null +++ b/java-core/.repo-metadata.json
@@ -0,0 +1,9 @@ +{ + "name": "google-cloud-core", + "name_pretty": "Google Cloud Core", + "release_level": "ga", + "language": "java", + "repo": "googleapis/java-core", + "repo_short": "java-core", + "distribution_name": "google-cloud-java" +}
diff --git a/java-core/CODE_OF_CONDUCT.md b/java-core/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..6b2238b --- /dev/null +++ b/java-core/CODE_OF_CONDUCT.md
@@ -0,0 +1,93 @@ +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *[PROJECT STEWARD NAME(s) AND EMAIL(s)]*, the +Project Steward(s) for *[PROJECT NAME]*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out the Project Steward, please email [email protected]. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file
diff --git a/java-core/CONTRIBUTING.md b/java-core/CONTRIBUTING.md new file mode 100644 index 0000000..ebbb59e --- /dev/null +++ b/java-core/CONTRIBUTING.md
@@ -0,0 +1,28 @@ +# How to Contribute + +We'd love to accept your patches and contributions to this project. There are +just a few small guidelines you need to follow. + +## Contributor License Agreement + +Contributions to this project must be accompanied by a Contributor License +Agreement. You (or your employer) retain the copyright to your contribution; +this simply gives us permission to use and redistribute your contributions as +part of the project. Head over to <https://cla.developers.google.com/> to see +your current agreements on file or to sign a new one. + +You generally only need to submit a CLA once, so if you've already submitted one +(even if it was for a different project), you probably don't need to do it +again. + +## Code reviews + +All submissions, including submissions by project members, require review. We +use GitHub pull requests for this purpose. Consult +[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more +information on using pull requests. + +## Community Guidelines + +This project follows +[Google's Open Source Community Guidelines](https://opensource.google.com/conduct/). \ No newline at end of file
diff --git a/java-core/LICENSE b/java-core/LICENSE index 4eedc01..d645695 100644 --- a/java-core/LICENSE +++ b/java-core/LICENSE
@@ -1,4 +1,5 @@ -Apache License + + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -178,7 +179,7 @@ APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" + boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a
diff --git a/java-core/README.md b/java-core/README.md new file mode 100644 index 0000000..d65c275 --- /dev/null +++ b/java-core/README.md
@@ -0,0 +1,63 @@ +# Google Cloud Java Client -- Core + +This module provides common functionality required by service-specific modules of this library. + +[![Kokoro CI][kokoro-badge]][kokoro-badge-link] +[](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-core.svg) + +- [API Documentation][api-docs] + +## Quickstart + +[//]: # ({x-version-update-start:google-cloud-core:released}) +If you are using Maven, add this to your pom.xml file +```xml +<dependency> + <groupId>com.google.cloud</groupId> + <artifactId>google-cloud-core</artifactId> + <version>1.84.0</version> +</dependency> +``` +If you are using Gradle, add this to your dependencies +```Groovy +compile 'com.google.cloud:google-cloud-core:1.84.0' +``` +If you are using SBT, add this to your dependencies +```Scala +libraryDependencies += "com.google.cloud" % "google-cloud-core" % "1.84.0" +``` +[//]: # ({x-version-update-end}) + +## Java Versions + +Java 7 or above is required for using this client. + +## Contributing + +Contributions to this library are always welcome and highly encouraged. + +See [CONTRIBUTING][contributing] documentation for more information on how to get started. + +Please note that this project is released with a Contributor Code of Conduct. By participating in +this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more +information. + +## Versioning + +This library follows [Semantic Versioning][semver]. + +It is currently in major version one (``1.y.z``), which means that the public API should be +considered stable. + +## License + +Apache 2.0 - See [LICENSE][license] for more information. + +[contributing]: https://github.com/googleapis/java-core/blob/master/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/java-core/blob/master/CODE_OF_CONDUCT.md +[license]: https://github.com/googleapis/java-core/blob/master/LICENSE +[semver]: http://semver.org/ +[cloud-platform]: https://cloud.google.com/ +[kokoro-badge]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-core/master.svg +[kokoro-badge-link]: (http://storage.googleapis.com/cloud-devrel-public/java/badges/java-core/master.html) +[api-docs]: https://googleapis.dev/java/google-cloud-core/latest
diff --git a/java-core/codecov.yaml b/java-core/codecov.yaml new file mode 100644 index 0000000..5724ea9 --- /dev/null +++ b/java-core/codecov.yaml
@@ -0,0 +1,4 @@ +--- +codecov: + ci: + - source.cloud.google.com
diff --git a/java-core/java.header b/java-core/java.header new file mode 100644 index 0000000..3a9b503 --- /dev/null +++ b/java-core/java.header
@@ -0,0 +1,15 @@ +^/\*$ +^ \* Copyright \d\d\d\d,? Google (Inc\.|LLC)( All [rR]ights [rR]eserved\.)?$ +^ \*$ +^ \* Licensed under the Apache License, Version 2\.0 \(the "License"\);$ +^ \* you may not use this file except in compliance with the License\.$ +^ \* You may obtain a copy of the License at$ +^ \*$ +^ \*[ ]+https?://www.apache.org/licenses/LICENSE-2\.0$ +^ \*$ +^ \* Unless required by applicable law or agreed to in writing, software$ +^ \* distributed under the License is distributed on an "AS IS" BASIS,$ +^ \* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.$ +^ \* See the License for the specific language governing permissions and$ +^ \* limitations under the License\.$ +^ \*/$
diff --git a/java-core/license-checks.xml b/java-core/license-checks.xml new file mode 100644 index 0000000..6597fce --- /dev/null +++ b/java-core/license-checks.xml
@@ -0,0 +1,10 @@ +<?xml version="1.0"?> +<!DOCTYPE module PUBLIC + "-//Puppy Crawl//DTD Check Configuration 1.3//EN" + "http://www.puppycrawl.com/dtds/configuration_1_3.dtd"> +<module name="Checker"> + <module name="RegexpHeader"> + <property name="fileExtensions" value="java"/> + <property name="headerFile" value="${checkstyle.header.file}"/> + </module> +</module>
diff --git a/java-core/renovate.json b/java-core/renovate.json new file mode 100644 index 0000000..e3e4334 --- /dev/null +++ b/java-core/renovate.json
@@ -0,0 +1,29 @@ +{ + "extends": [ + "config:base" + ], + "ignoreDeps": [ + "com.google.api:gax-bom", + "com.google.guava:guava", + "com.google.guava:guava-testlib", + "com.google.protobuf:protobuf-java", + "com.google.protobuf:protobuf-java-util", + "io.opencensus:opencensus-api", + "io.opencensus:opencensus-contrib-grpc-util", + "io.opencensus:opencensus-contrib-http-util" + ], + "packageRules": [ + { + "packagePatterns": ["^io.grpc:grpc-"], + "groupName": "gRPC packages" + }, + { + "packagePatterns": ["^com.google.protobuf:protobuf-"], + "groupName": "Protobuf packages" + }, + { + "packagePatterns": ["^io.opencensus:opencensus-"], + "groupName": "OpenCensus packages" + } + ] +} \ No newline at end of file
diff --git a/java-core/synth.metadata b/java-core/synth.metadata new file mode 100644 index 0000000..97bbf24 --- /dev/null +++ b/java-core/synth.metadata
@@ -0,0 +1,12 @@ +{ + "updateTime": "2019-09-06T16:09:54.850638Z", + "sources": [ + { + "template": { + "name": "java_library", + "origin": "synthtool.gcp", + "version": "2019.5.2" + } + } + ] +} \ No newline at end of file
diff --git a/java-core/synth.py b/java-core/synth.py new file mode 100644 index 0000000..b3e7b1e --- /dev/null +++ b/java-core/synth.py
@@ -0,0 +1,27 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""This script is used to synthesize generated parts of this library.""" + +import synthtool as s +import synthtool.gcp as gcp +import logging +logging.basicConfig(level=logging.DEBUG) +common_templates = gcp.CommonTemplates() +templates = common_templates.java_library() +s.copy(templates, excludes=[ + '.gitignore', + 'README.md', +]) +