diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index a0c0cd49..fca7c299 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -37,6 +37,16 @@ branchProtectionRules: - "units (8)" - "units (11)" - "Kokoro - Test: Integration" + - "dependencies (8, java-bigquery)" + - "dependencies (8, java-bigqueryconnection)" + - "dependencies (8, java-spanner)" + - "dependencies (8, java-storage)" + - "dependencies (8, java-pubsub)" + - "dependencies (11, java-bigquery)" + - "dependencies (11, java-bigqueryconnection)" + - "dependencies (11, java-spanner)" + - "dependencies (11, java-storage)" + - "dependencies (11, java-pubsub)" - "cla/google" # List of explicit permissions to add (additive only) permissionRules: diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0195b32f..65ae6ecd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [7, 8, 11] + java: [8, 11] steps: - uses: actions/checkout@v2 - uses: actions/setup-java@v1 diff --git a/.github/workflows/downstream.yaml b/.github/workflows/downstream.yaml new file mode 100644 index 00000000..f28021e4 --- /dev/null +++ b/.github/workflows/downstream.yaml @@ -0,0 +1,26 @@ +on: + push: + branches: + - master + pull_request: +name: downstream +jobs: + dependencies: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [8, 11] + repo: + - java-bigqueryconnection + - java-spanner + - java-storage + - java-pubsub + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: ${{matrix.java}} + - run: java -version + - run: sudo apt-get install libxml2-utils + - run: .kokoro/client-library-check.sh ${{matrix.repo}} diff --git a/.kokoro/client-library-check.sh b/.kokoro/client-library-check.sh new file mode 100755 index 00000000..03cee53b --- /dev/null +++ b/.kokoro/client-library-check.sh @@ -0,0 +1,65 @@ +#!/bin/bash +# Copyright 2021 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. + +# Presubmit to ensure the dependencies of the Google Libraries BOM, with the modification of change +# in the PR, pick up the highest versions among transitive dependencies. +# https://maven.apache.org/enforcer/enforcer-rules/requireUpperBoundDeps.html + +set -eo pipefail +# Display commands being run. +set -x + +if [[ $# -lt 1 ]]; +then + echo "Usage: $0 " + exit 1 +fi +REPO=$1 + +## 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}/.. + +# Make artifacts available for 'mvn validate' at the bottom +mvn install -DskipTests=true -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V -q + +# Read the current version of this BOM in the POM. Example version: '0.116.1-alpha-SNAPSHOT' +VERSION_POM=pom.xml +# Namespace (xmlns) prevents xmllint from specifying tag names in XPath +VERSION=`sed -e 's/xmlns=".*"//' ${VERSION_POM} | xmllint --xpath '/project/version/text()' -` + +if [ -z "${VERSION}" ]; then + echo "Version is not found in ${VERSION_POM}" + exit 1 +fi +echo "Version: ${VERSION}" + +# Check this BOM against a few java client libraries +# java-bigquery +git clone "https://github.com/googleapis/${REPO}.git" --depth=1 +pushd ${REPO} + +# replace version +xmllint --shell <(cat pom.xml) << EOF +setns x=http://maven.apache.org/POM/4.0.0 +cd .//x:artifactId[text()="google-cloud-shared-config"] +cd ../x:version +set ${VERSION} +save pom.xml +EOF + +# run dependencies script +.kokoro/dependencies.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index 9738f8d9..9b116a35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## [1.0.0](https://www.github.com/googleapis/java-shared-config/compare/v0.13.1...v1.0.0) (2021-07-29) + + +### ⚠ BREAKING CHANGES + +* update shared-config to java 1.8 (#277) + +### Features + +* update shared-config to java 1.8 ([#277](https://www.github.com/googleapis/java-shared-config/issues/277)) ([9c297a2](https://www.github.com/googleapis/java-shared-config/commit/9c297a27bc236092aab3ae292c7bed206293bc51)) + ### [0.13.1](https://www.github.com/googleapis/java-shared-config/compare/v0.13.0...v0.13.1) (2021-07-27) diff --git a/README.md b/README.md index 1112cb9c..c5483137 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ If you are using Maven, use this artifact as your project's parent. com.google.cloud google-cloud-shared-config - 0.13.1 + 1.0.0 ``` diff --git a/pom.xml b/pom.xml index c0295115..2800a63a 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.google.cloud google-cloud-shared-config pom - 0.13.1 + 1.0.0 Google Cloud https://github.com/googleapis/java-shared-config @@ -171,8 +171,8 @@ maven-compiler-plugin 3.8.1 - 1.7 - 1.7 + 1.8 + 1.8 UTF-8 -Xlint:unchecked -Xlint:deprecation @@ -410,6 +410,25 @@ + + org.codehaus.mojo + animal-sniffer-maven-plugin + + + java8 + + check + + + + org.codehaus.mojo.signature + java18 + 1.0 + + + + + @@ -711,45 +730,6 @@ - - autovalue-java7 - - 1.7 - - ${basedir}/EnableAutoValue.txt - - - - - 1.4 - - - - - maven-compiler-plugin - - - - com.google.auto.value - auto-value - ${auto-value.version} - - - - - - - - autovalue-java8 diff --git a/synth.metadata b/synth.metadata index 9143a0ce..3511987b 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-shared-config.git", - "sha": "4d152461a5592940a8be762c7a8698a02dbe26cf" + "sha": "7a5f7dba61f247f34ce66d1d116796bbfa87133b" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "5d3c52f5db664eee9026db76b5bcb466f3a09ca9" + "sha": "1a2878d6909dd10ca4e3c1b5943d6622e996054e" } } ], diff --git a/versions.txt b/versions.txt index 2a442d51..d2ec6181 100644 --- a/versions.txt +++ b/versions.txt @@ -1,4 +1,4 @@ # Format: # module:released-version:current-version -google-cloud-shared-config:0.13.1:0.13.1 +google-cloud-shared-config:1.0.0:1.0.0