Skip to content
This repository has been archived by the owner on Jun 26, 2024. It is now read-only.
/ AndResGuard Public archive
forked from shwenzhang/AndResGuard

proguard resource for Android by wechat team. 迁移到Gradle 8+

License

Notifications You must be signed in to change notification settings

lalakii/AndResGuard

 
 

Repository files navigation

AndResGuard.Unofficial

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

目前使用的 Gradle 8.8 + AGP 8.5.0 编译,运行良好

新增v3/v4签名算法~

目前用在一些自己的小玩具上,挺不错的~ 不过由于自身没有什么时间这个项目就不长期维护拉

演示项目 AndResGuardDemo

文档

AndResGuard

如何使用

修改项目中对应的文件

  • build.gradle.kts
plugins {
    id("cn.lalaki.AndResGuard") version "$latest_version" apply false
}
  • app/build.gradle.kts
plugins {
    id("AndResGuard")
}

andResGuard {
    //增加了两个配置项,其他的参数查看官方仓库文档
    onlyV3V4Sign = boolean    //仅使用v3/v4签名
    delMetaInf = boolean      //删除apk的META-INF目录,因为删除操作在apk签名之前,所以不会影响v1签名

   //  此节点已经重构。以后不再需要手动配置。
   //  sevenzip {
   //      artifact = "cn.lalaki.AndResGuard:SevenZip:$latest_version"
   // }
}
  • gradle.properties
# 可能需要禁用资源优化,生成的APK才会正常工作
android.enableResourceOptimizations=false

# 可能需要禁用Gradle守护进程,否则会导致部分生成的文件被占用(Windows)
org.gradle.daemon=false

编译APK

准备就绪后,在项目的根目录打开终端,使用下面的命令

# Powershell
.\gradlew resguardRelease

# Linux
./gradlew resguardRelease

编译完成终端会输出output: 路径指向最终生成的apk文件

by lalaki.cn

Languages

  • Java 94.8%
  • Groovy 4.7%
  • Kotlin 0.5%
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy