Skip to content

PranavPurwar/D8Merger

Repository files navigation

D8 Dex Merging Tool

Allows you to merge multiple dex files using D8. Supports multidex and other options.

This code has been extracted from Android Studio as a standalone tool to merge dex files using D8.

Commit Hash: 4a71eee69871580140f3ad232ae6def06562185c (2025-03-03 17:50)

Few modifications have been made so that it can be run on Android aswell.

Available through Jitpack

In root settings.gradle at the end of repositories

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        mavenCentral()
        maven { url 'https://jitpack.io' }
    }
}

In your project build.gradle

dependencies {
    implementation("com.github.PranavPurwar:D8Merger:cfae90406c")
}

Usage

import dev.pranav.d8.merger.DexMerger;

DexMerger.merge(
    dexFiles = listOf(File("classes.dex"), File("classes2.dex")),
    outputDir = File("/path/to/outputDir")
)

View this file for information about the rest of available options.

About

Merge multiple DEX files using D8/R8 tool from Android SDK

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Contributors