A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cloud.google.com/endpoints/docs/frameworks/java/gen_clients below:

Generating a client library | Cloud Endpoints Frameworks for App Engine

Generating a client library

Stay organized with collections Save and categorize content based on your preferences.

This page describes how to generate a client library from your backend API. Any Java or Android app can use this library to call the API.

To create iOS clients for your API, we recommend that you use Google APIs Objective-C Client Library for REST APIs.

Before you begin Generating the client library

The following instructions demonstrate how to use the Cloud Endpoints Frameworks Apache Maven and Gradle plugins to generate a Gradle client bundle from the sample Maven project Getting started with Endpoints.

To generate a client library:

  1. Build your API

  2. Run the Endpoints Frameworks command-line tool similarly to the following:

    Maven
    mvn endpoints-framework:clientLibs
    Gradle
    gradle endpointsClientLibs

    Wait for the tool to generate the library; on success the tool displays a message similar to this one:

    Maven
    API client library written to target/client-libs/echo-v1-java.zip
    Gradle
    API client library written to build/endpointsClientLibs/echo-v1-java.zip
  3. Unzip the file by using the unzip utility, or use another ZIP-compatible unarchiving utility:

    unzip ./echo-v1-java.zip
    
  4. Change directory:

    cd echo
    
  5. Build the client library:

    Maven
    mvn clean package

    The output is in the target/ directory. The exact filename depends on the version of the Java client. It is something similar to echo-v1-1.23.0-SNAPSHOT.jar.

    Gradle
    gradle build

    The output is in the build/libs directory. The exact filename depends on the version of the Java client. It is something similar to echo-v1-1.23.0-SNAPSHOT.jar.

  6. Add the client library JAR to your Java or Android app.

  7. Repeat these steps every time you modify your API code.

What's next

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-08-07 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["This guide details the process of generating a client library from a backend API for use in Java or Android applications."],["The client library is generated using the Cloud Endpoints Frameworks' Apache Maven or Gradle plugins, through command-line instructions."],["After building the API, run either `mvn endpoints-framework:clientLibs` or `gradle endpointsClientLibs` to generate a zip containing the client library."],["The generated library ZIP file needs to be unzipped, and then built using either `mvn clean package` or `gradle build`, producing a JAR file."],["The resulting JAR file, found in the target or build/libs directory, should be added to your Java or Android application for it to communicate with the API, and the process must be repeated every time the API is modified."]]],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4