0
votes

Environment: Grails: 3.2.8 IntelliJ

I am using the google api java client: https://github.com/google/google-oauth-java-client and am under the impression that I also need to include the google http client (https://developers.google.com/api-client-library/java/google-http-java-client/setup) and the google oauth client (https://developers.google.com/api-client-library/java/google-oauth-java-client/setup#google-oauth-client-java6). I was able to add google api client as a dependency in gradle: compile 'com.google.api-client:google-api-client:1.22.0'

But am unsure how to add the other libraries? On the links attached, you're able to add them using maven, but is there any gradle way? Or would I have to download the jar files and include them in a libs folder? How would I link it as a dependency from there?

1

1 Answers

1
votes

When you need to find a dependency use http://mvnrepository.com/ they have a search box on top. When I search for "google oauth" this is what I find:

http://mvnrepository.com/artifact/com.google.oauth-client/google-oauth-client/1.22.0

They have tabs for various build tools that give you the exact syntax you need.

For Gradle:

google-oath:

compile group: 'com.google.oauth-client', name: 'google-oauth-client', version: '1.22.0'

google-http:

compile group: 'com.google.http-client', name: 'google-http-client', version: '1.22.0'