FREEDOM251

Freedom251 › Code Obfuscation Software

R8

Free plan APILinux

Visit R8 Alternatives Pricing

R8's own site

What R8 is

R8 is a free, open-source Java program for shrinking and minifying code. It converts Java bytecode into optimized DEX code for Android, and the same repository includes D8, which converts Java bytecode to DEX. R8 removes unreachable code and can optimize execution by inlining methods and merging classes. It also shortens class, field, and method names to reduce DEX file size. With Android Gradle Plugin 8.12.0 and later, R8’s optimization phases can optimize resources as well.

R8 takes class files as input and can produce DEX for Android apps or class files for Java apps. Android Gradle Plugin includes R8, and users can replace the embedded version with a prebuilt or locally built JAR. It can also be integrated into a Bazel build pipeline; Bazel is not officially supported for Android app development. R8 uses the ProGuard configuration format, with keep rules supplied in a file through the --pg-conf option. Stable and development builds are available from Google Maven, and CI archive downloads are documented. The project recommends enabling optimization for a tested release build, since it can lengthen build times and make debugging harder.

Who it suits

R8 suits developers building Android apps who want to optimize Java bytecode for DEX, and Java developers who need class-file output. It is also relevant to teams using Android Gradle Plugin or integrating the command-line tool into a Bazel pipeline.

What it does well

  • Removes unreachable code and can inline methods and merge classes.
  • Shortens class, field, and method names to reduce DEX size.
  • Optimizes resources with Android Gradle Plugin 8.12.0 and later.
  • Can output Android DEX or Java class files.
  • Included in Android Gradle Plugin, with version override options.

What to know first

  • The listed platform is Linux.
  • Optimization can increase build time and make debugging harder.
  • The command line does not support every ProGuard usage; keep rules require a file.

Plans

PlanBilled and limitsPrice
R8Open-source repository; prebuilt stable and development versions availableFree

As r8.googlesource.com lists them, read 11 Oct 2026. The maker's own page has the final word.

Getting started

  1. Open the R8 project website.
  2. Use R8 embedded in Android Gradle Plugin, or obtain a stable or development build from Google Maven or a CI archive.
  3. If needed, replace the embedded version with a prebuilt or locally built JAR.
  4. Provide class files as input and pass ProGuard-format keep rules in a configuration file using --pg-conf.

Verdict

Choose R8 if you need Java bytecode optimization for Android DEX, especially within an Android Gradle Plugin build. Look elsewhere if your workflow depends on full command-line compatibility with ProGuard, or if longer builds and harder debugging are unsuitable.

Questions

Is R8 free?

Yes. Its pricing model is free, and its pricing note identifies it as open source.

What platforms and outputs does R8 support?

Linux is the listed platform. R8 can produce Android DEX or Java class files from class-file input.

Does R8 work with Android Gradle Plugin?

Android Gradle Plugin includes R8. Users can override the embedded version with a prebuilt or locally built JAR.

Can I use R8 with Bazel?

R8 can be integrated into a Bazel build pipeline. Bazel is not officially supported for Android app development.

Is R8 fully compatible with ProGuard on the command line?

No. For example, keep rules must be supplied in a configuration file through --pg-conf rather than on the command line.

Where can I get R8 builds?

Stable and development builds are available from Google Maven, and the project documents CI archive downloads.

Facts from R8's own pages

Android integration
The Android Gradle plugin ships with R8 embedded, and the repository documents how to override that version. · r8.googlesource.com, 11 Oct 2026
Build
The documented source build uses Chromium depot_tools and produces a JAR containing both R8 and D8. · r8.googlesource.com, 11 Oct 2026
Build requirements
Building from source requires depot_tools and a Java 8 compiler and runtime; the documented IntelliJ setup points to a Linux JDK path. · r8.googlesource.com, 4 Oct 2026
Compatibility limit
R8 is not command-line compatible with ProGuard; keep rules must be passed in a configuration file using --pg-conf. · r8.googlesource.com, 11 Oct 2026
Configuration
R8 uses the ProGuard configuration format to configure whole-program optimization and application entry points. · r8.googlesource.com, 11 Oct 2026
Contributions
Contributors must sign a Contributor License Agreement, or a Corporate Contributor License Agreement when the contribution belongs to their employer. · r8.googlesource.com, 11 Oct 2026
D8 modes
D8 defaults to debug mode, and its release mode removes debugging information to produce smaller DEX files. · r8.googlesource.com, 11 Oct 2026
Distribution
Stable and development builds are available from Google Maven, and the project also documents CI archive downloads. · r8.googlesource.com, 4 Oct 2026
Downloads
Stable and development prebuilt versions are available from Google Maven and the project's CI archive. · r8.googlesource.com, 11 Oct 2026
Input and output
R8 consumes class files and can output DEX for Android apps or class files for Java apps. · r8.googlesource.com, 11 Oct 2026
Integration
Android Gradle Plugin ships with R8 embedded, and users can override the embedded version with a prebuilt or locally built JAR. · r8.googlesource.com, 4 Oct 2026
Intended users
The documentation describes R8 as an app optimizer and recommends enabling it for a tested release build, while warning that optimization can increase build time and make debugging harder. · developer.android.com, 4 Oct 2026
Notable limitation
The R8 command line is not compatible with ProGuard in every respect; for example, keep rules must be supplied in a file rather than on the command line. · r8.googlesource.com, 4 Oct 2026
Obfuscation
R8 shortens class, field, and method names to reduce DEX file size. · developer.android.com, 4 Oct 2026
Optimization
R8 removes unreachable code and can optimize execution through method inlining and class merging. · developer.android.com, 4 Oct 2026
Other build systems
R8 can be integrated into a Bazel build pipeline, though the Android Developers page says Bazel is not officially supported for Android app development. · developer.android.com, 4 Oct 2026
Platform requirements
The build instructions say the first run bootstraps Gradle and required JDKs, and Android-targeted R8 use requires an Android SDK platform android.jar. · r8.googlesource.com, 11 Oct 2026
Product
The repository contains D8, which converts Java bytecode to DEX, and R8, which shrinks and minifies Java programs while producing optimized DEX code. · r8.googlesource.com, 11 Oct 2026
R8 compiler
R8 is a whole-program optimizing compiler focused on reducing program size. · r8.googlesource.com, 11 Oct 2026
Resource optimization
R8 optimizes resources as part of its optimization phases with Android Gradle Plugin 8.12.0 and later. · developer.android.com, 4 Oct 2026
Security and compliance
The opened R8 project page contains no security or compliance claims. · r8.googlesource.com, 4 Oct 2026
Support
The project directs users to [email protected] for questions and to separate issue trackers for D8 and R8. · r8.googlesource.com, 11 Oct 2026
What it does
R8 is a Java program shrinking and minification tool that converts Java bytecode to optimized DEX code; the same repository includes D8, which converts Java bytecode to DEX. · r8.googlesource.com, 4 Oct 2026

Where R8 stands on Freedom251

Look at these too