Gson Installation

Learn to include gson dependency in the java applications using build tools like maven, gradle or simple jar file.

The latest version of Gson is 2.8.9.

1. Install Gson with Gradle/Android

Include gson in the application or android project by adding the following dependency:

dependencies {
    compile group: 'com.google.code.gson', name: 'gson', version: '2.8.9'
}

2. Install Gson with Maven

Download the latest Gson version or required version in Maven Central by adding the following dependency:

<dependencies>
    <dependency>
      <groupId>com.google.code.gson</groupId>
      <artifactId>gson</artifactId>
      <version>2.8.9</version>
    </dependency>
</dependencies>

3. Install Gson as Jar file

The jar file can be downloaded from this location.

Happy Learning !!

Download Sourcecode

Was this post helpful?

Join 7000+ Awesome Developers

Get the latest updates from industry, awesome resources, blog updates and much more.

* We do not spam !!

Leave a Comment

HowToDoInJava

A blog about Java and related technologies, the best practices, algorithms, and interview questions.