Google Cloud Storage Virtual Client Library with Gradle

Google is promoting its new Java Client library here: https://developers.google.com/appengine/docs/java/googlecloudstorageclient/

Note. I am not talking about my own REST library. I want to work with the Java client library.

The Google website does not specify an import directive for Gradle. For Maven, pom.xml looks like this:

<dependency> <groupId>com.google.appengine.tools</groupId> <artifactId>appengine-gcs-client</artifactId> <version>RELEASE</version> </dependency> 

When I change this to work with my Gradle project, it does not work:

 dependencies { compile 'com.google.appengine.tools:appengine-gcs-client:RELEASE' } 

It finds the tools there, but com.google.appengine.tools.cloudstorage cannot be allowed (however, it allows the tools).

What I did then: I deleted the library and archived it for "gcs" in the Android Studio dependencies dialog box; and he finds and adds the following directive for build.gradle:

 dependencies { compile 'com.google.appengine.tools:appengine-gcs-client: 0.3.9@jar ' } 

A similar problem with this: tools are allowed, but not tools.cloudstorage.

  • What am I doing wrong? Where will the library live / what import instruction do I need to add to Gradle?

I do not want to download the jar, because I want my project to automatically update the banks. mavenCentral () is installed, and here is my complete build.gradle file, just in case you need it:

 apply plugin: 'java' repositories { mavenCentral() } dependencies { compile 'com.google.appengine.tools:appengine-gcs-client: 0.3.9@jar ' compile 'com.google.http-client:google-http-client-android:1.18.0-rc' } 

Any help appreciated, thanks!

+7
java google-app-engine google-cloud-storage android-studio gradle
source share
1 answer

You can use the following information to indicate version 0.4.4 (the last as of 01/01/2012):

 compile 'com.google.appengine.tools:appengine-gcs-client:0.4.4' 

or indicate the latest version with a plus sign:

 compile 'com.google.appengine.tools:appengine-gcs-client:+' 

Using the latter is a faster answer, but in the future it may lead to unforeseen compatibility issues when releasing updates.

+4
source share

All Articles