diff --git a/.github/release-please.yml b/.github/release-please.yml index dce2c8450..72ef01bed 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -1,2 +1,8 @@ releaseType: java-yoshi -bumpMinorPreMajor: true \ No newline at end of file +bumpMinorPreMajor: true +handleGHRelease: true +branches: + - releaseType: java-lts + bumpMinorPreMajor: true + branch: 1.10.1-sp + handleGHRelease: true diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index be76ae755..7c26125bd 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -2,21 +2,30 @@ rebaseMergeAllowed: true squashMergeAllowed: true mergeCommitAllowed: false branchProtectionRules: -- pattern: master - isAdminEnforced: true - requiredStatusCheckContexts: - - 'codecov/patch' - - 'codecov/project' - - 'cla/google' - requiredApprovingReviewCount: 1 - requiresCodeOwnerReviews: true - requiresStrictStatusChecks: true + - pattern: master + isAdminEnforced: true + requiredStatusCheckContexts: + - units + - format + - cla/google + requiredApprovingReviewCount: 1 + requiresCodeOwnerReviews: true + requiresStrictStatusChecks: true + - pattern: 1.10.1-sp + isAdminEnforced: true + requiredStatusCheckContexts: + - units + - format + - cla/google + requiredApprovingReviewCount: 1 + requiresCodeOwnerReviews: true + requiresStrictStatusChecks: true permissionRules: -- team: Googlers - permission: pull -- team: yoshi-java - permission: push -- team: yoshi-java-admins - permission: admin -- team: yoshi-admins - permission: admin + - team: Googlers + permission: pull + - team: yoshi-java + permission: push + - team: yoshi-java-admins + permission: admin + - team: yoshi-admins + permission: admin diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 263aa40e6..099bd8da8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -23,10 +23,6 @@ jobs: run: ./gradlew test - name: Gradle Build run: ./gradlew build install - - name: coverage - uses: codecov/codecov-action@v1 - with: - name: actions ${{ matrix.java }} format: runs-on: ubuntu-latest steps: diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 4757df8eb..fbf2695f4 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -23,5 +23,3 @@ echo $JOB_TYPE ./gradlew assemble ./gradlew build install - -bash $KOKORO_GFILE_DIR/codecov.sh diff --git a/.kokoro/presubmit/common.cfg b/.kokoro/presubmit/common.cfg index 09383a58f..3958711ba 100644 --- a/.kokoro/presubmit/common.cfg +++ b/.kokoro/presubmit/common.cfg @@ -24,11 +24,3 @@ env_vars: { value: "test" } -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "dpebot_codecov_token" - } - } -} diff --git a/.kokoro/release/publish_javadoc11.cfg b/.kokoro/release/publish_javadoc11.cfg new file mode 100644 index 000000000..2d99e2448 --- /dev/null +++ b/.kokoro/release/publish_javadoc11.cfg @@ -0,0 +1,30 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# cloud-rad production +env_vars: { + key: "STAGING_BUCKET_V2" + value: "docs-staging-v2" +} + +# Configure the docker image for kokoro-trampoline +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/api-common-java/.kokoro/release/publish_javadoc11.sh" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "docuploader_service_account" + } + } +} + +# Downloads docfx doclet resource. This will be in ${KOKORO_GFILE_DIR}/ +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/docfx" diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh new file mode 100755 index 000000000..b9a8f55ea --- /dev/null +++ b/.kokoro/release/publish_javadoc11.sh @@ -0,0 +1,56 @@ +#!/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_V2}" ]]; 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 + +NAME=api-common +VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) + +# build the docs +./gradlew javadocCombinedV3 + +# copy README to tmp_docs dir and rename index.md +cp README.md tmp_docs/index.md + +pushd tmp_docs + +# 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_V2} \ + --destination-prefix docfx + +popd diff --git a/CHANGELOG.md b/CHANGELOG.md index 56eb7b608..6c595aa5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.10.4](https://www.github.com/googleapis/api-common-java/compare/v1.10.3...v1.10.4) (2021-05-19) + + +### Dependencies + +* update dependency com.google.errorprone:error_prone_annotations to v2.7.1 ([#231](https://www.github.com/googleapis/api-common-java/issues/231)) ([51b00e0](https://www.github.com/googleapis/api-common-java/commit/51b00e0603583fc3b781783945dcbccef81a22fd)) + ### [1.10.3](https://www.github.com/googleapis/api-common-java/compare/v1.10.2...v1.10.3) (2021-04-22) diff --git a/README.md b/README.md index 51f24b3e9..f139ae63d 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,6 @@ API Common for Java [![Build Status](https://travis-ci.org/googleapis/api-common-java.svg?branch=master)](https://travis-ci.org/googleapis/api-common-java) -[![Code Coverage](https://img.shields.io/codecov/c/github/googleapis/api-common-java.svg)](https://codecov.io/github/googleapis/api-common-java) - - [Documentation](https://googleapis.dev/java/api-common/latest/index.html) API Common for Java is a library for foundational types relating to Google diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 000000000..8b58ae9c0 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,7 @@ +# Security Policy + +To report a security issue, please use [g.co/vulnz](https://g.co/vulnz). + +The Google Security Team will respond within 5 working days of your report on g.co/vulnz. + +We use g.co/vulnz for our intake, and do coordination and disclosure here using GitHub Security Advisory to privately discuss and fix the issue. diff --git a/build.gradle b/build.gradle index 5d1128c1c..625b0f6c5 100644 --- a/build.gradle +++ b/build.gradle @@ -27,7 +27,7 @@ apply plugin: 'io.codearte.nexus-staging' group = "com.google.api" archivesBaseName = "api-common" -project.version = "1.10.3" // {x-version-update:api-common:current} +project.version = "1.10.4" // {x-version-update:api-common:current} sourceCompatibility = 1.7 targetCompatibility = 1.7 @@ -43,7 +43,7 @@ ext { auto_value_annotations: 'com.google.auto.value:auto-value-annotations:1.8.1', guava: 'com.google.guava:guava:30.1.1-android', jsr305: 'com.google.code.findbugs:jsr305:3.0.2', - error_prone_annotations: 'com.google.errorprone:error_prone_annotations:2.6.0', + error_prone_annotations: 'com.google.errorprone:error_prone_annotations:2.7.1', // Testing junit: 'junit:junit:4.13.2', @@ -112,6 +112,26 @@ javadoc.options { links 'https://docs.oracle.com/javase/7/docs/api/' } +// JavaDocV3 +// ------- + +task javadocJarV3(type: Jar) { + classifier = 'javadoc' + from javadoc +} + +javadoc.options { + encoding = 'UTF-8' + links 'https://docs.oracle.com/javase/7/docs/api/' + + if (JavaVersion.current().isJava8Compatible()) { + addStringOption('Xdoclint:all,-missing', '-quiet') + } + if (JavaVersion.current().isJava11Compatible()) { + addStringOption('-release', '7') + } +} + // Test Logging // ------------ @@ -312,6 +332,24 @@ tasks.verifyGoogleJavaFormat { } test.dependsOn verifyGoogleJavaFormat +// JavaDocV3 docFX +// +task javadocCombinedV3(type: Javadoc) { + source project.sourceSets.main.allJava + classpath = files(project.sourceSets.main.compileClasspath) + destinationDir = new File(projectDir, 'tmp_docs') + + options.addStringOption('encoding', 'UTF-8') + options.addStringOption("doclet", "com.microsoft.doclet.DocFxDoclet") + options.docletpath = [file(System.getenv('KOKORO_GFILE_DIR') + "/docfx-doclet-1.0-SNAPSHOT-jar-with-dependencies-172556.jar")] +} + +clean { + delete 'tmp_gh-pages/' + delete 'tmp_docs/' +} + + // Release // ======= diff --git a/codecov.yaml b/codecov.yaml deleted file mode 100644 index 5724ea947..000000000 --- a/codecov.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -codecov: - ci: - - source.cloud.google.com diff --git a/versions.txt b/versions.txt index 7df685a7a..72419e5d6 100644 --- a/versions.txt +++ b/versions.txt @@ -1,4 +1,4 @@ # Format: # module:released-version:current-version -api-common:1.10.3:1.10.3 \ No newline at end of file +api-common:1.10.4:1.10.4 \ No newline at end of file