Skip to content

About

APKRepacker is a gradle plugin that helps you automatically repackage and modify your APK after building.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

APKRepacker - Android Gradle Plugin

Maven Central License: Apache-2.0 (shields.io)

APKRepacker is a gradle plugin that helps you automatically repackage and modify your APK after building. It makes it easier for developers to customize their APKs—such as removing content or adding resources—saving you from manual work.

This plugin is compatible with AGP 9, ensuring seamless integration with the latest Android build tools and features.

Configuration

Add the following to your file: app/build.gradle, see: app/build.gradle

plugins {
    id "cn.lalaki.buildSrc" version "1.2.2"
}

def yourTask = tasks.register("yourTaskName") {
    doLast {
        println "This is your custom task."
    }
}

// configuration
repackageConfig {
    // *Sign your apk
    autoSign = true
    storeFile = "D:\\lalaki-new-1.jks"
    keyAlias = "0"
    ksPass = "0"
    keyPass = "0"
    signerName = "hello"

    // *Remove version-control-info.textproto and app-metadata.properties
    includeMetaData = false

    // *Remove DebugProbesKt.bin
    debugKt = false

    // *Remove custom files from the APK. support '*' wildcard
    blackList = List.of("*.version", "lib/armeabi-v7a/libbarhopper_v3.so")

    // *Add file to apk assets dir, only file! can't add dir!
    addAssetsList = List.of("D:\\test.txt")

    // *Print the APK path to the console.
    printOutputApk = true

    // *After APKRepacker Task
    doAfterTask = yourTask.getName()  // or doAfterTask = "yourTaskName"

    // *Disable this plugin.
    disabled = false
}

License

The Apache Software License, Version 2.0

About

APKRepacker is a gradle plugin that helps you automatically repackage and modify your APK after building.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages