0
votes

I am still trying to get my head around some intricacies in java and I need to clearly understand if Google Drive API can be set up and used in Eclipse and JDK.

This is because I noticed that in the quickstart here: https://developers.google.com/drive/v3/web/quickstart/java

One of the requirements is Gradle 2.3. And also a need for a Build.gradle file.

Having done little work on Android Studio, I am aware that this is possible when coding in Android-SDK environment. The challenge is that the program I am writing is meant for JRE machines and not Android enviroment. So is the Google API meant to be run on Android-Only enviroment? If no, is there a quickstart for setting it up on Eclipse WITHOUT the gradle, build and all the android related aspects?

1
Given the intro says "a simple Java command-line application" you can be sure that example is not for Android. And what is wrong with using gradle, it is a common build tool for Java, and it won't get in your way in most cases. - Mark Rotteveel
Thanks Mark. I had no idea that gradle can be harnessed in a clean java application. Alright then, since there is no lazy way out of this... I'll try it and post the result on how to go about it. I noticed there are no simple guides to achieving this connection to google drive yet. - Jojo

1 Answers

0
votes

I think Gradle is not a must, but also Maven

    `<dependency>
        <groupId>com.google.api-client</groupId>
        <artifactId>google-api-client</artifactId>
        <version>1.22.0</version>
    </dependency>
    <dependency>
        <groupId>com.google.oauth-client</groupId>
        <artifactId>google-oauth-client-jetty</artifactId>
        <version>1.22.0</version>
    </dependency>
    <dependency>
        <groupId>com.google.apis</groupId>
        <artifactId>google-api-services-drive</artifactId>
        <version>v3-rev108-1.22.0</version>
    </dependency>`

And if you aren't really want drill into Google API, perhaps you can consider to use same libraries to simplify your codes.

e.g. Google Drive FileUtils (GDFU) https://github.com/twinzen/Google-Drive-FileUtils