diff --git a/.kokoro/release/drop.sh b/.kokoro/release/drop.sh
index abc381e5d..5c4551efa 100755
--- a/.kokoro/release/drop.sh
+++ b/.kokoro/release/drop.sh
@@ -15,11 +15,18 @@
set -eo pipefail
-source $(dirname "$0")/common.sh
+# 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 --settings=settings.xml
+mvn nexus-staging:drop -B \
+ --settings=settings.xml \
+ -DstagingRepositoryId=${STAGING_REPOSITORY_ID}
diff --git a/.kokoro/release/promote.sh b/.kokoro/release/promote.sh
index 439e0fc3e..1fa95fa53 100755
--- a/.kokoro/release/promote.sh
+++ b/.kokoro/release/promote.sh
@@ -15,6 +15,12 @@
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")/../../
@@ -22,4 +28,7 @@ pushd $(dirname "$0")/../../
setup_environment_secrets
create_settings_xml_file "settings.xml"
-mvn nexus-staging:release -DperformRelease=true --settings=settings.xml
+mvn nexus-staging:release -B \
+ -DperformRelease=true \
+ --settings=settings.xml \
+ -DstagingRepositoryId=${STAGING_REPOSITORY_ID}
diff --git a/README.md b/README.md
index 6727b011a..f2d3ec80d 100644
--- a/README.md
+++ b/README.md
@@ -197,7 +197,7 @@ To use Maven, add the following lines to your pom.xml file:
com.google.api-client
google-api-client
- 1.27.0
+ 1.28.0
@@ -210,7 +210,7 @@ repositories {
mavenCentral()
}
dependencies {
- compile 'com.google.api-client:google-api-client:1.27.0'
+ compile 'com.google.api-client:google-api-client:1.28.0'
}
```
[//]: # ({x-version-update-end})
diff --git a/google-api-client-android/pom.xml b/google-api-client-android/pom.xml
index 580a94a0f..a7e698a3b 100644
--- a/google-api-client-android/pom.xml
+++ b/google-api-client-android/pom.xml
@@ -4,7 +4,7 @@
com.google.api-client
google-api-client-parent
- 1.27.1-SNAPSHOT
+ 1.28.0
../pom.xml
google-api-client-android
diff --git a/google-api-client-appengine/pom.xml b/google-api-client-appengine/pom.xml
index be856b656..96577532e 100644
--- a/google-api-client-appengine/pom.xml
+++ b/google-api-client-appengine/pom.xml
@@ -4,7 +4,7 @@
com.google.api-client
google-api-client-parent
- 1.27.1-SNAPSHOT
+ 1.28.0
../pom.xml
google-api-client-appengine
diff --git a/google-api-client-assembly/pom.xml b/google-api-client-assembly/pom.xml
index 100b41dd0..c42e5f7b8 100644
--- a/google-api-client-assembly/pom.xml
+++ b/google-api-client-assembly/pom.xml
@@ -4,7 +4,7 @@
com.google.api-client
google-api-client-parent
- 1.27.1-SNAPSHOT
+ 1.28.0
../pom.xml
com.google.api-client
diff --git a/google-api-client-bom/README.md b/google-api-client-bom/README.md
index e5e9fba43..2954c7ac8 100644
--- a/google-api-client-bom/README.md
+++ b/google-api-client-bom/README.md
@@ -12,7 +12,7 @@ To use it in Maven, add the following to your `pom.xml`:
com.google.api-client
google-api-client-bom
- 1.27.0
+ 1.28.0
pom
import
diff --git a/google-api-client-bom/pom.xml b/google-api-client-bom/pom.xml
index 6d8746b73..74163f603 100644
--- a/google-api-client-bom/pom.xml
+++ b/google-api-client-bom/pom.xml
@@ -3,7 +3,7 @@
4.0.0
com.google.api-client
google-api-client-bom
- 1.27.1-SNAPSHOT
+ 1.28.0
pom
Google API Client Library for Java BOM
@@ -63,52 +63,52 @@
com.google.api-client
google-api-client
- 1.27.1-SNAPSHOT
+ 1.28.0
com.google.api-client
google-api-client-android
- 1.27.1-SNAPSHOT
+ 1.28.0
com.google.api-client
google-api-client-appengine
- 1.27.1-SNAPSHOT
+ 1.28.0
com.google.api-client
google-api-client-assembly
- 1.27.1-SNAPSHOT
+ 1.28.0
com.google.api-client
google-api-client-gson
- 1.27.1-SNAPSHOT
+ 1.28.0
com.google.api-client
google-api-client-jackson2
- 1.27.1-SNAPSHOT
+ 1.28.0
com.google.api-client
google-api-client-java6
- 1.27.1-SNAPSHOT
+ 1.28.0
com.google.api-client
google-api-client-protobuf
- 1.27.1-SNAPSHOT
+ 1.28.0
com.google.api-client
google-api-client-servlet
- 1.27.1-SNAPSHOT
+ 1.28.0
com.google.api-client
google-api-client-xml
- 1.27.1-SNAPSHOT
+ 1.28.0
diff --git a/google-api-client-gson/pom.xml b/google-api-client-gson/pom.xml
index 184dcb62d..0c933e3a4 100644
--- a/google-api-client-gson/pom.xml
+++ b/google-api-client-gson/pom.xml
@@ -4,7 +4,7 @@
com.google.api-client
google-api-client-parent
- 1.27.1-SNAPSHOT
+ 1.28.0
../pom.xml
google-api-client-gson
diff --git a/google-api-client-jackson2/pom.xml b/google-api-client-jackson2/pom.xml
index 4cfdfbbf9..33fdbb6be 100644
--- a/google-api-client-jackson2/pom.xml
+++ b/google-api-client-jackson2/pom.xml
@@ -4,7 +4,7 @@
com.google.api-client
google-api-client-parent
- 1.27.1-SNAPSHOT
+ 1.28.0
../pom.xml
google-api-client-jackson2
diff --git a/google-api-client-java6/pom.xml b/google-api-client-java6/pom.xml
index f6c4392ec..667705b27 100644
--- a/google-api-client-java6/pom.xml
+++ b/google-api-client-java6/pom.xml
@@ -4,7 +4,7 @@
com.google.api-client
google-api-client-parent
- 1.27.1-SNAPSHOT
+ 1.28.0
../pom.xml
google-api-client-java6
diff --git a/google-api-client-protobuf/pom.xml b/google-api-client-protobuf/pom.xml
index ac3c5dd20..cdbaaed06 100644
--- a/google-api-client-protobuf/pom.xml
+++ b/google-api-client-protobuf/pom.xml
@@ -4,7 +4,7 @@
com.google.api-client
google-api-client-parent
- 1.27.1-SNAPSHOT
+ 1.28.0
../pom.xml
google-api-client-protobuf
diff --git a/google-api-client-servlet/pom.xml b/google-api-client-servlet/pom.xml
index 2b441eb7d..b13a823fb 100644
--- a/google-api-client-servlet/pom.xml
+++ b/google-api-client-servlet/pom.xml
@@ -4,7 +4,7 @@
com.google.api-client
google-api-client-parent
- 1.27.1-SNAPSHOT
+ 1.28.0
../pom.xml
google-api-client-servlet
diff --git a/google-api-client-xml/pom.xml b/google-api-client-xml/pom.xml
index e30f01b61..6146192d4 100644
--- a/google-api-client-xml/pom.xml
+++ b/google-api-client-xml/pom.xml
@@ -4,7 +4,7 @@
com.google.api-client
google-api-client-parent
- 1.27.1-SNAPSHOT
+ 1.28.0
../pom.xml
google-api-client-xml
diff --git a/google-api-client/pom.xml b/google-api-client/pom.xml
index 2a2677b34..5259a5311 100644
--- a/google-api-client/pom.xml
+++ b/google-api-client/pom.xml
@@ -4,7 +4,7 @@
com.google.api-client
google-api-client-parent
- 1.27.1-SNAPSHOT
+ 1.28.0
../pom.xml
google-api-client
@@ -100,6 +100,10 @@
com.google.http-client
google-http-client-jackson2
+
+ com.google.http-client
+ google-http-client-apache
+
com.google.http-client
google-http-client-gson
diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/apache/GoogleApacheHttpTransport.java b/google-api-client/src/main/java/com/google/api/client/googleapis/apache/GoogleApacheHttpTransport.java
index b1c4163ee..64dd3ad33 100644
--- a/google-api-client/src/main/java/com/google/api/client/googleapis/apache/GoogleApacheHttpTransport.java
+++ b/google-api-client/src/main/java/com/google/api/client/googleapis/apache/GoogleApacheHttpTransport.java
@@ -17,9 +17,20 @@
import com.google.api.client.googleapis.GoogleUtils;
import com.google.api.client.http.apache.ApacheHttpTransport;
+import com.google.api.client.util.SslUtils;
import java.io.IOException;
+import java.net.ProxySelector;
import java.security.GeneralSecurityException;
import java.security.KeyStore;
+import java.util.concurrent.TimeUnit;
+import javax.net.ssl.SSLContext;
+import org.apache.http.client.HttpClient;
+import org.apache.http.config.SocketConfig;
+import org.apache.http.conn.socket.LayeredConnectionSocketFactory;
+import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
+import org.apache.http.impl.conn.SystemDefaultRoutePlanner;
/**
* Utilities for Google APIs based on {@link ApacheHttpTransport}.
@@ -31,13 +42,41 @@ public final class GoogleApacheHttpTransport {
/**
* Returns a new instance of {@link ApacheHttpTransport} that uses
- * {@link GoogleUtils#getCertificateTrustStore()} for the trusted certificates using
- * {@link com.google.api.client.http.apache.ApacheHttpTransport.Builder#trustCertificates(KeyStore)}.
+ * {@link GoogleUtils#getCertificateTrustStore()} for the trusted certificates.
*/
public static ApacheHttpTransport newTrustedTransport() throws GeneralSecurityException,
IOException {
- return new ApacheHttpTransport.Builder().trustCertificates(
- GoogleUtils.getCertificateTrustStore()).build();
+ // Set socket buffer sizes to 8192
+ SocketConfig socketConfig =
+ SocketConfig.custom()
+ .setRcvBufSize(8192)
+ .setSndBufSize(8192)
+ .build();
+
+ PoolingHttpClientConnectionManager connectionManager =
+ new PoolingHttpClientConnectionManager(-1, TimeUnit.MILLISECONDS);
+
+ // Disable the stale connection check (previously configured in the HttpConnectionParams
+ connectionManager.setValidateAfterInactivity(-1);
+
+ // Use the included trust store
+ KeyStore trustStore = GoogleUtils.getCertificateTrustStore();
+ SSLContext sslContext = SslUtils.getTlsSslContext();
+ SslUtils.initSslContext(sslContext, trustStore, SslUtils.getPkixTrustManagerFactory());
+ LayeredConnectionSocketFactory socketFactory = new SSLConnectionSocketFactory(sslContext);
+
+ HttpClient client = HttpClientBuilder.create()
+ .useSystemProperties()
+ .setSSLSocketFactory(socketFactory)
+ .setDefaultSocketConfig(socketConfig)
+ .setMaxConnTotal(200)
+ .setMaxConnPerRoute(20)
+ .setRoutePlanner(new SystemDefaultRoutePlanner(ProxySelector.getDefault()))
+ .setConnectionManager(connectionManager)
+ .disableRedirectHandling()
+ .disableAutomaticRetries()
+ .build();
+ return new ApacheHttpTransport(client);
}
private GoogleApacheHttpTransport() {
diff --git a/pom.xml b/pom.xml
index 09f91c121..5f0ccb361 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
com.google.api-client
google-api-client-parent
- 1.27.1-SNAPSHOT
+ 1.28.0
pom
Parent for the Google API Client Library for Java
@@ -162,6 +162,11 @@
google-http-client-android
${project.http.version}
+
+ com.google.http-client
+ google-http-client-apache
+ ${project.http-apache.version}
+
com.google.http-client
google-http-client-appengine
@@ -543,8 +548,9 @@
- Internally, update the default features.json file
-->
UTF-8
- 1.27.0
- 1.27.0
+ 1.28.0
+ 2.0.0
+ 1.28.0
3.0.2
2.1
1.9.13
diff --git a/versions.txt b/versions.txt
index 6c5b5ff95..803e4956d 100644
--- a/versions.txt
+++ b/versions.txt
@@ -1,6 +1,7 @@
# Format:
# module:released-version:current-version
-google-api-client:1.27.0:1.27.1-SNAPSHOT
-google-http-client:1.27.0:1.27.1-SNAPSHOT
-google-oauth-client:1.27.0:1.27.1-SNAPSHOT
+google-api-client:1.28.0:1.28.0
+google-http-client:1.28.0:1.28.0
+google-http-client-apache:2.0.0:2.0.0
+google-oauth-client:1.28.0:1.28.0