Open-source project
lysine-dev/retrofit avatar
lysine-dev/retrofit

Retrofit 3.0.0: A Type-Safe HTTP Client for Android and the JVM

GitHub describes it as A type-safe HTTP client for Android and the JVM. The repository metadata lists Java as its primary language. The metadata lists the Apache-2.0 license. This article stays within the project description and details documented in the GitHub repository README.

43,937 stars7,322 forksJavaApache-2.0

At a glance

What is it?
Retrofit remains a standard type-safe HTTP client for Android and JVM projects. The README lists version 3.0.0 with a minimum of Java 8+ or Android API 21+.
Who is it for?
Adopt Retrofit 3.0.0 if you are starting a new Android or JVM project and can meet the Java 8+ or Android API 21+ baseline. If you are on an older Android API level or a Java version below 8, you cannot meet the 3.0.0 baseline.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly Java, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • lysine-dev/retrofit43,937 ★ · +12
Star history
Repository2026-08-132026-11-15
lysine-dev/retrofit43.9k43.9k

12 Stars in the last 94 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The Problem Retrofit Solves

Retrofit turns a Java interface into an HTTP client. You declare methods with annotations like @GET or @POST, and Retrofit generates the request and response handling. This removes the boilerplate of manually building URLs, parsing JSON, and managing callbacks. It is aimed at Android developers and JVM backend teams who want a typed API for REST services. The library has been around for years, and this release continues that pattern. If you have ever written a raw HttpURLConnection loop, you know the pain Retrofit removes.

How Retrofit Works Under the Hood

Retrofit does not do the network I/O itself. It delegates to OkHttp, which is listed as a dependency. You define an interface, and Retrofit creates an implementation at runtime. Each method maps to an HTTP request based on annotations and parameter types. The response is converted from the raw body into your return type using a converter, which you plug in separately. The README does not list converters, but the architecture is clear from the project layout. This separation means you can swap JSON libraries or add custom converters without touching the core. The type safety comes from the compiler: if your interface method returns a User object, Retrofit will try to deserialize the response into that type.

Getting Retrofit 3.0.0 into Your Build

The README gives exact coordinates: com.squareup.retrofit2:retrofit:3.0.0. You can grab the JAR from Maven Central or use a build tool. For Maven, add the dependency, and for Gradle, use implementation 'com.squareup.retrofit2:retrofit:3.0.0'. The minimum requirement is Java 8+ or Android API 21+. That means older Android devices running API 20 or below are not supported. Snapshots of the development version are in Sonatype's snapshots repository, which is useful if you want to test unreleased fixes.

R8 and ProGuard: A Concrete Difference

The README is explicit about shrinking and obfuscation. If you use R8, the rules are included automatically. That is a convenience: you do not have to copy anything. ProGuard users must manually add the options from retrofit2.pro, which is referenced in the repository. The README also points to rules for OkHttp, which is a dependency. This is a real maintenance cost. If you forget the ProGuard rules, Retrofit may break at runtime with confusing errors about missing classes or methods. The automatic R8 handling is a plus, but ProGuard users have to track two sets of rules. Not a deal-breaker, but a step that is easy to miss in a large project.

The 3.0.0 Release: What Actually Changed

The release notes are thin, but the version jump from 2.12.0 to 3.0.0 suggests breaking changes. The README confirms the new coordinates and the minimum Java/Android versions. The 2.12.0 release came out on the same day, which is odd. It might be a patch for those who cannot move to 3.x. The 2.11.0 release was over a year earlier, in March 2024. This gap indicates a slow release cycle. For a library this mature, that is fine. You do not want frequent churn in a core dependency. But it also means you should read the changelog carefully before upgrading, because the README does not list what changed beyond the version and requirements.

Where Retrofit Is the Wrong Tool

Retrofit is not a fit for every HTTP need. If you need streaming responses or WebSocket support, OkHttp directly might be better. Retrofit's model is request-response with a typed body. For long-lived connections, you would fight the abstraction. Also, if your API is highly dynamic, with endpoints that change at runtime, the compile-time interface approach becomes a liability. You would have to use @Url parameters and reflection, which defeats the type safety. Another limitation: the README does not mention any built-in converter, so you need to add one for JSON. That is an extra dependency and configuration step. On a small project, a simple HTTP client might be enough.

Alternatives and How They Differ

The most direct alternative is OkHttp alone. Retrofit builds on OkHttp, so you can use OkHttp for the network layer and write your own parsing code. The difference is that OkHttp gives you a Request and Response object, not a typed interface. You handle the conversion manually. Another alternative is Ktor Client for Kotlin projects, but that is a different ecosystem. For JVM-only projects, java.net.http.HttpClient is built into the JDK, but it lacks the annotation-driven interface. Retrofit's advantage is the declarative style: you write an interface and get a client. The trade-off is that you depend on a library that adds a layer of abstraction. If you prefer explicit control, the alternatives are better.

Maintenance and Upgrade Cost

The repository is not archived, and the last push was on 2026-10-31, well after the 3.0.0 release on 2025-05-15. The license is Apache-2.0, which means you can use it commercially without paying, but you must preserve copyright notices. The maintenance cost is low for a library like this: it is stable, and the release cadence is slow. However, the upgrade cost is not zero. Moving from 2.x to 3.x requires updating your dependency version and checking your minimum API level. You also need to re-verify your ProGuard rules. The README gives no migration guide, so you have to rely on the changelog or community resources. For a project that has been running on 2.11.0 for a year, the jump to 3.0.0 should be planned, not automatic.

Editorial conclusion

Adopt Retrofit 3.0.0 if you are starting a new Android or JVM project and can meet the Java 8+ or Android API 21+ baseline. If you are on an older Android API level or a Java version below 8, you cannot meet the 3.0.0 baseline. Before switching, verify your build uses the com.squareup.retrofit2:retrofit:3.0.0 coordinates and that your ProGuard setup includes the retrofit2.pro rules, since R8 picks them up automatically but ProGuard does not. Check your OkHttp version against the linked OkHttp ProGuard rules to avoid runtime surprises.

Frequently asked questions

What does retrofit mean?

Retrofit is the name of this type-safe HTTP client for Android and the JVM.

how to use retrofit in android

The README shows no usage. It gives the download as a JAR or Maven central at com.squareup.retrofit2:retrofit:3.0.0, states Java 8+ or Android API 21+ as the minimum, notes the R8 and ProGuard rules, and points to https://lysine.dev/retrofit/ for everything else.

how to use retrofit in jetpack compose

Compose is not mentioned anywhere in the file, and the repository's primary language is Java. The only example location named is samples/build.gradle and samples/src/, and the README gives no Compose or Kotlin specific instruction.

how to use retrofit in kotlin

Not addressed beyond the stated floor of Java 8+ or Android API 21+, with no Kotlin specific instructions. The top-level modules are retrofit, retrofit-adapters, retrofit-bom, retrofit-converters, retrofit-mock, retrofit-response-type-keeper, samples and website.

how to install retrofit windows

Fitting windows is a different meaning of the word entirely. This project is added as a dependency at com.squareup.retrofit2:retrofit:3.0.0 from Maven central, or taken as a downloaded JAR, with development snapshots hosted in Sonatype's snapshots repository.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
  4. Release notes
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/lysine-dev-retrofit.svg)](https://hysenlabs.com/projects/lysine-dev-retrofit)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/lysine-dev-retrofit.svg)](https://hysenlabs.com/projects/lysine-dev-retrofit)

Was this useful?