생성된 라이브러리를 사용하지 않는 경우 자바용 Google API 클라이언트 라이브러리 및 종속 항목을 zip 파일로 다운로드하거나 Maven을 사용할 수 있습니다.
자바용 Google HTTP 클라이언트 라이브러리에 포함된 ProGuard 설정 안내도 참고하세요.
종속 항목이 있는 라이브러리 다운로드
다운로드 페이지에서 확인할 수 있는 최신 ZIP 파일을 다운로드하여 컴퓨터에서 압축을 풉니다. 이 zip 파일에는 각 아티팩트와 종속 항목의 클라이언트 라이브러리 클래스 jar 파일과 관련 소스 jar 파일이 포함되어 있습니다. 종속 항목 폴더에서 다양한 라이브러리의 종속 항목 그래프와 라이선스를 확인할 수 있습니다. 다운로드 콘텐츠에 관한 자세한 내용은 readme.html 파일을 참조하세요.
Android
Android용으로 개발 중이고 사용할 Google API가 Google Play 서비스 라이브러리에 포함되어 있는 경우 최상의 성능과 환경을 위해 Google Play 서비스 라이브러리를 사용하세요.
Android에서 자바용 Google API 클라이언트 라이브러리를 사용하는 경우 Android와 호환되는 종속 항목, 특히 Android SDK 수준을 알고 있어야 합니다. Android 애플리케이션에는 libs 폴더에서 다음 jar 파일이나 호환되는 최신 버전이 필요합니다.
- google-api-client-2.0.0.jar
- google-api-client-android-2.0.0.jar
- google-oauth-client-1.34.1.jar
- google-http-client-1.42.2.jar
- google-http-client-android-1.42.2.jar
- gson-2.9.0.jar
- ackson-core-2.13.3.jar
- jsr305-3.0.2.jar
- protobuf-java-3.21.4.jar
Google App Engine
Google App Engine 애플리케이션에는 libs 폴더에서 다음과 같은 jar 파일이나 최신 호환 버전이 필요합니다.
- google-api-client-2.0.0.jar
- google-api-client-appengine-2.0.0.jar
- Google API -
- google-oauth-client-1.34.1.jar
- google-oauth-client-appengine-1.34.1.jar
- google-oauth-client-webserver-1.34.1.jar
- google-http-client-1.42.2.jar
- google-http-client-appengine-1.39.2.jar
- gson-2.9.0.jar
- ackson-core-2.13.3.jar
- jdo2-api-2.3-eb.jar
- jsr305-3.0.2.jar
- protobuf-java-3.21.4.jar
- transaction-api-1.1.jar
- xpp3-1.1.4c.jar
서블릿
Servlet 애플리케이션에는 libs 폴더에서 다음과 같은 jar 파일이나 최신 호환 버전이 필요합니다.
- google-api-client-2.0.0.jar
- Google API -
- google-oauth-client-1.34.1.jar
- google-oauth-client-webserver-1.34.1.jar
- google-http-client-1.42.2.jar
- Commons-logging-1.2.jar
- gson-2.9.0.jar
- httpclient-4.5.13.jar
- httpcore-4.4.12.jar
- ackson-core-2.13.3.jar
- jdo2-api-2.3-eb.jar
- jsr305-3.0.2.jar
- protobuf-java-3.21.4.jar
- transaction-api-1.1.jar
- xpp3-1.1.4c.jar
일반 자바
범용 자바 애플리케이션에는 libs 폴더에서 다음과 같은 jar 파일이나 최신 호환 버전이 필요합니다.
- google-api-client-2.0.0.jar
- google-oauth-client-1.34.1.jar
- google-http-client-1.42.2.jar
- google-http-client-ackson2-1.39.2.jar
- Commons-logging-1.2.jar
- gson-2.9.0.jar
- httpclient-4.5.13.jar
- httpcore-4.4.12.jar
- ackson-core-2.13.3.jar
- jsr305-3.0.2.jar
- protobuf-java-3.21.4.jar
- xpp3-1.1.4c.jar
Google API용으로 생성된 라이브러리
생성된 라이브러리의 저장소에는 각 API 버전을 사용하는 방법에 대한 지침이 있습니다.
Maven
자바용 Google API 클라이언트 라이브러리는 중앙 Maven 저장소에 있습니다.
이 라이브러리의 모든 아티팩트의 Maven groupId
은 com.google.api-client
입니다.
아래는 모듈별 Maven 안내입니다.
모듈
이 라이브러리는 9개의 모듈로 구성됩니다.
- google-api-client
- google-api-client-android
- google-api-client-appengine
- google-api-client-ldap
- google-api-client-gson
- google-api-client-ackson2
- google-api-client-java6
- google-api-client-protobuf
- google-api-client-xml
google-api-client
자바용 Google API 클라이언트 라이브러리 (google-api-client)는 Android를 비롯하여 지원되는 모든 자바 플랫폼과 호환되도록 설계되었습니다.
Maven 사용:
<dependency> <groupId>com.google.api-client</groupId> <artifactId>google-api-client</artifactId> <version>2.0.0</version> </dependency>
Android에서는 사용하지 않는 종속 항목을 명시적으로 제외해야 합니다.
<dependency> <groupId>com.google.api-client</groupId> <artifactId>google-api-client</artifactId> <version>2.0.0</version> <exclusions> <exclusion> <artifactId>xpp3</artifactId> <groupId>xpp3</groupId> </exclusion> <exclusion> <artifactId>httpclient</artifactId> <groupId>org.apache.httpcomponents</groupId> </exclusion> <exclusion> <artifactId>junit</artifactId> <groupId>junit</groupId> </exclusion> <exclusion> <artifactId>android</artifactId> <groupId>com.google.android</groupId> </exclusion> </exclusions> </dependency>
Google-API-클라이언트-Android
자바용 Google API 클라이언트 라이브러리 (google-api-client-android)의 확장은 자바 Google Android (SDK 2.1 이상에만 해당) 애플리케이션을 지원합니다. 이 모듈은 google-api-client 및 google-http-client-android에 종속됩니다.
Maven 사용:
<dependency> <groupId>com.google.api-client</groupId> <artifactId>google-api-client-android</artifactId> <version>2.0.0</version> </dependency>
Google 클라이언트 API
자바용 Google API 클라이언트 라이브러리 (google-api-client- 서블릿)에 대한 Servlet 및 JDO 확장 프로그램은 자바 서블릿 웹 애플리케이션을 지원합니다. 이 모듈은 google-api-client 및 google-oauth-client- 서블릿에 종속됩니다.
Maven 사용:
<dependency> <groupId>com.google.api-client</groupId> <artifactId>google-api-client-servlet</artifactId> <version>2.0.0</version> </dependency>
google-api-client-appengine
자바용 Google API 클라이언트 라이브러리 (google-api-client-appengine)의 Google App Engine 확장 프로그램은 자바 Google App Engine 애플리케이션을 지원합니다. 이 모듈은 google-api-client, google-api-client- 서블릿, google-oauth-client-appengine, google-http-client-appengine을 사용합니다.
Maven 사용:
<dependency> <groupId>com.google.api-client</groupId> <artifactId>google-api-client-appengine</artifactId> <version>2.0.0</version> </dependency>
google-api-client-gson
자바용 Google API 클라이언트 라이브러리 (google-api-client-gson)의 GSON 확장 프로그램 이 모듈은 google-api-client 및 google-http-client-gson에 종속됩니다.
Maven 사용:
<dependency> <groupId>com.google.api-client</groupId> <artifactId>google-api-client-gson</artifactId> <version>2.0.0</version> </dependency>
google-api-client-jackson2
자바용 Google API 클라이언트 라이브러리 (google-api-client-ackson2)에 대한 Jackson2의 확장 프로그램입니다. 이 모듈은 google-api-client 및 google-http-client-ackson2에 종속됩니다.
Maven 사용:
<dependency> <groupId>com.google.api-client</groupId> <artifactId>google-api-client-jackson2</artifactId> <version>2.0.0</version> </dependency>
google-api-client-java6
자바용 Google API 클라이언트 라이브러리(google-api-client-java6)의 자바 6 이상 확장 프로그램입니다. 이 모듈은 google-api-client 및 google-oauth-client-java6에 종속됩니다.
Maven 사용:
<dependency> <groupId>com.google.api-client</groupId> <artifactId>google-api-client-java6</artifactId> <version>2.0.0</version> </dependency>
google-api-client-protobuf
자바용 Google API 클라이언트 라이브러리 (google-api-client-protobuf)에 대한 프로토콜 버퍼 확장 프로그램 이 모듈은 google-http-client-protobuf 및 google-api-client에 종속됩니다.
Maven 사용:
<dependency> <groupId>com.google.api-client</groupId> <artifactId>google-api-client-protobuf</artifactId> <version>2.0.0</version> </dependency>
google-api-client-xml
자바용 Google API 클라이언트 라이브러리 (google-api-client-xml)의 XML 확장 프로그램입니다. 이 모듈은 google-api-client 및 google-http-client-xml에 종속됩니다.
Maven 사용:
<dependency> <groupId>com.google.api-client</groupId> <artifactId>google-api-client-xml</artifactId> <version>2.0.0</version> </dependency>