Google promotes their new Java Client library here: https://developers.google.com/appengine/docs/java/googlecloudstorageclient/
Note: I am not talking about the native REST library. I want to work with the Java Client Library.
On the website, Google does not specify the 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 doesn't work:
dependencies {
compile 'com.google.appengine.tools:appengine-gcs-client:RELEASE'
}
It finds the tools there, but the com.google.appengine.tools.cloudstorage cannot be resolved (it resolves tools, though).
What I did then: I removed the library and seached for "gcs" in the Android Studio dependencies dialog; and it finds and adds the following directive to build.gradle:
dependencies {
compile 'com.google.appengine.tools:appengine-gcs-client:0.3.9@jar'
}
Same problem with that as before: tools is resolved, but not tools.cloudstorage.
- What am I doing wrong? Where does the library live/which import statement will I need to add to Gradle?
I don't want to download the jar as I want my project to update jars automatically. mavenCentral() is set, and here is my full 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!
appengine-gcs-client:RELEASE
can't be resolved? AFAIK, Gradle doesn't supportRELEASE
(but it does supportlatest.release
). What happens when you build from the command line? Also try to omit the@jar
part. – Peter Niederwieser