Skip to content

Commit

Permalink
Google api java client (#1244)
Browse files Browse the repository at this point in the history
* Fix Copyright notices (#1174)

* add OSGI metadata

* more default behavior

* add OSGI info

* whitespace

* Remove (c) from copyright notices

* Remove obsolete mercurial and google code detritus (#1175)

* add OSGI metadata

* more default behavior

* add OSGI info

* whitespace

* Remove out of date docs we don't use anymore now that we're on Github and git

* update appengine SDK (#1178)

* update minimum maven (#1179)

* Fix AppEngine tests (#1184)

* Add continuous integration Kokoro CI config and badges (#1171)

* Add continuous integration Kokoro CI config and badges

* Fix indentation and https

* Add CODEOWNERS and issue/pr templates (#1185)

*  App Engine standard uses Java 7 or Java 8, not 6 and not 9 or later (#1186)

* App Engine uses Java 7 or later

* App Engine uses Java 8 or earlier

* Add the ending Java 6 support notice to README (#1190)

* Add Kokoro release scripts (#1188)

* Add Kokoro release scripts

* Remove unnecessary extra maven-jar compile after upgrading plugins

* Add the appengine api

* skip tests

* Install play services

* Install play services only if not installed

* Install other dependencies

* Fix the BUGFIX_VERSION constant

* Fix CODEOWNERS format

* Annotate versions for replacement (#1192)

* Release v1.26.0 (#1193)

* Release v1.26.0

* Actually use the nexus-staging-maven-plugin

* Fix leftover snapshot versions in assembly

* Fix snapshot version in assembly

* Bump next snapshot (#1194)

* Bump next snapshot

* Fix version replace region tag.

* Release improvements (#1195)

* Can run mvn assembly:single outside of build

* Filter dependency html files

* Use assembly to rename versioned properties files

* Remove datanucleus dependency (#1183)

* Fix possible NPE when missing os.version system property (#1210)

* Add tests for missing os.version system property

* Only append the OS name/version if we can get them from the system properties

* Fix test allow testing different system properties

* Fix tests

* Fix the reset of system properties

* Remove unused import

* undo change to AsesrtHeaderTransport

* Fix codestyle

* Delay request initialization for resumable upload (#1211)

* Delay request initialization for resumable upload until the content chunk is ready

* Fix javadoc link

* Adding test for a slow writer

* Make ContentChunk class static for internal clarity lint.

* Add final to ContentChunk fields set only in constructor

* Add google-api-client-bom artifact (#1213)

* Add google-api-client-bom artifact

* Apply README.md suggestions

* Release google-api-java-client v1.27.0 (#1214)

* Release v1.27.0

* bom needs developers section and release config/profile

* Bump next snapshot (#1215)

* Update guava to 26.0-android (#1218)

* Compile to Java 1.7 and fix javadoc links (#1222)

* Add Java 11 test configs (#1223)

* Add Java 11 test configs

* Update README badges

* Update maven-javadoc-plugin for Java 11

* Fix X-Goog-Api-Client java version parsing for Java 11

* Update README: edited and removed some redundancy (#1226)

* Fix old links to code.google.com  (#1225)

* Update google-api-client-dependencies.html

* updated links

fixed links

* Update package-info.java

* corrected links

* edited links

* Update google-api-client-appengine-dependencies.html

* Update google-api-client-appengine-dependencies.html

* Update google-http-client-appengine-dependencies.html

* Update google-oauth-client-appengine-dependencies.html

* Update GoogleAuthorizationCodeTokenRequest.java

* Update package-info.java

* Update GoogleOAuthConstants.java

* Update package-info.java

* Update package-info.java

* Update GoogleJsonError.java

* Remove usage of deprecated Backoff from google-http-java-client (#1221)

* Remove ClientLogin (#1224)

* Remove ClientLogin

* Bump clirr comparison version and note that we are removing beta classes

* Set expires_in to an hour instead of 1000 hours (#1229)

* Use maven enforcer plugin for maven version requirements (#1228)

* Handle the legacy endpoint in the MockTokenServerTransport (#1232)

* Handle the legacy endpoint in the MockTokenServerTransport with a warning

* Bump maven-surefire-plugin version for test environment fixes

* Release google-api-java-client v1.28.0 (#1233)

* Release v1.28.0

* Fix dependency for google-http-client-apache and Apache transport

* Fix promote/drop kokoro configs

* Bump next snapshot (#1234)

* 3929: Changed to Guava ByteStreams.copy() that has a bit better performance (#1239)

* Add automatic module name (#1235)

* 956: Chech for null to prevent autoboxing NPE. (#1241)

* 956: Chech for null to prevent autoboxing NPE.

* 956: Add an unit test.

* Infinite cycle with MediaHttpDownloader setContentRange download (#1242)

* 1101: Fixed infinite cycle with MediaHttpDownloader setContentRange download.

* 1101: Added unit tests.

* 1101: Fixed comments.

* Fix Replaced invalidateToken method to clearToken (#1243)

* Replaced invalidateToken method to clearToken

* Fix throw exception
  • Loading branch information
Bhanditz authored and sduskis committed Mar 12, 2019
1 parent 02000de commit c7afd0c
Show file tree
Hide file tree
Showing 218 changed files with 3,520 additions and 3,172 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @googleapis/yoshi-java
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Thanks for stopping by to let us know something could be better!

Please be sure to include as much information as possible:

#### Environment details

- OS:
- Java version:
- google-api-java-client version:

#### Steps to reproduce

1. ?
2. ?

#### Stacktrace

```
Any relevant stacktrace here.
```

#### External references such as API reference guides used

- ?

#### Any additional information below

Making sure to follow these steps will guarantee the quickest resolution possible.

Thanks!

4 changes: 4 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Fixes #<issue_number_goes_here> (it's a good idea to open an issue first for discussion)

- [ ] Tests pass
- [ ] Appropriate docs were updated (if necessary)
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ bin/
.classpath
.settings
.project

*.iml
.idea
6 changes: 0 additions & 6 deletions .hgignore

This file was deleted.

24 changes: 24 additions & 0 deletions .kokoro/continuous/common.cfg
Original file line number Diff line number Diff line change
@@ -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: "google-api-java-client/.kokoro/trampoline.sh"

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/google-api-java-client/.kokoro/build.sh"
}

env_vars: {
key: "JOB_TYPE"
value: "test"
}
7 changes: 7 additions & 0 deletions .kokoro/continuous/java10.cfg
Original file line number Diff line number Diff line change
@@ -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/java10"
}
7 changes: 7 additions & 0 deletions .kokoro/continuous/java11.cfg
Original file line number Diff line number Diff line change
@@ -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"
}
7 changes: 7 additions & 0 deletions .kokoro/continuous/java7.cfg
Original file line number Diff line number Diff line change
@@ -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"
}
7 changes: 7 additions & 0 deletions .kokoro/continuous/java8.cfg
Original file line number Diff line number Diff line change
@@ -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"
}
33 changes: 33 additions & 0 deletions .kokoro/install_dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/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

# Install the android SDK
mvn dependency:get -Dartifact=com.google.android:android:4.1.1.4

# Install the appengine SDK
mvn dependency:get -Dartifact=com.google.appengine:appengine-api-1.0-sdk:1.9.65

# Install play services
mvn dependency:get -Dartifact=com.google.android.google-play-services:google-play-services:1 -o -DremoteRepositories=file:~/.m2 || \
(wget https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-basement/8.3.0/play-services-basement-8.3.0.aar && \
unzip play-services-basement-8.3.0.aar && \
mvn install:install-file \
-Dfile=classes.jar \
-DgroupId=com.google.android.google-play-services \
-DartifactId=google-play-services \
-Dversion=1 \
-Dpackaging=jar)
8 changes: 4 additions & 4 deletions .kokoro/presubmit/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
build_file: "google-api-java-client/.kokoro/trampoline.sh"

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/google-api-java-client/.kokoro/build.sh"
key: "TRAMPOLINE_BUILD_FILE"
value: "github/google-api-java-client/.kokoro/build.sh"
}

env_vars: {
key: "JOB_TYPE"
value: "test"
key: "JOB_TYPE"
value: "test"
}
4 changes: 2 additions & 2 deletions .kokoro/presubmit/java10.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java10"
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java10"
}
7 changes: 7 additions & 0 deletions .kokoro/presubmit/java11.cfg
Original file line number Diff line number Diff line change
@@ -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"
}
4 changes: 2 additions & 2 deletions .kokoro/presubmit/java7.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java7"
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java7"
}
4 changes: 2 additions & 2 deletions .kokoro/presubmit/java8.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
}
4 changes: 2 additions & 2 deletions .kokoro/presubmit/java9.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java9"
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java9"
}
56 changes: 56 additions & 0 deletions .kokoro/release/common.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# 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: "google-api-java-client/.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"
}
}
}
50 changes: 50 additions & 0 deletions .kokoro/release/common.sh
Original file line number Diff line number Diff line change
@@ -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
}
7 changes: 7 additions & 0 deletions .kokoro/release/drop.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Tell the trampoline which build file to use.
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/google-api-java-client/.kokoro/release/drop.sh"
}
32 changes: 32 additions & 0 deletions .kokoro/release/drop.sh
Original file line number Diff line number Diff line change
@@ -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}
7 changes: 7 additions & 0 deletions .kokoro/release/promote.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Tell the trampoline which build file to use.
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/google-api-java-client/.kokoro/release/promote.sh"
}
34 changes: 34 additions & 0 deletions .kokoro/release/promote.sh
Original file line number Diff line number Diff line change
@@ -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}
Loading

0 comments on commit c7afd0c

Please sign in to comment.