6

I'm using proguard to obfuscate my code, and I have one module called a library and in that module I have an assets folder and I'm keeping some jars that I'm using in runtime. I want to keep that assets folder in the proguard.

Here is how it's looking the structure:

enter image description here

How can I keep these? or How can we pass the path of the file in ProGuard?

Mahdi Moqadasi
  • 2,029
  • 4
  • 26
  • 52
Harsh Shah
  • 2,162
  • 2
  • 19
  • 39

1 Answers1

1

To keep directory we can use this in dexguard rules:

-keepdirectories mydirectory/*

or just keep exactly the resource: (worked for assets in aar):

-keepresourcefiles */myFile.bar
Mahdi Moqadasi
  • 2,029
  • 4
  • 26
  • 52