jyonkheel
jyonkheel

Reputation: 463

Proguard move all obfuscated class to one package

By now I can keep some classes and methods etc via proguard, now that obfuscation works perfectly here is my question, I've noticed proguard happens to repackage some classes like this com.a.a, com.a.b, is there a way to avoid leaving hints like com.x.x and put all of the obfuscated classes in one package like a.a.**? (real life example of a hint I've seen looks like org.apache.a.x, anyone decompiling my code will immediately skip that particular package because it reeks of library jar, i want to merge obfuscated library and obfuscated original code into one package). i tried this config but it didn't work.

        -allowaccessmodification
        -mergeinterfacesaggressively
        -useuniqueclassmembernames
        -keeppackagenames doNotKeepAThing   

Upvotes: 4

Views: 2168

Answers (1)

jyonkheel
jyonkheel

Reputation: 463

-repackageclasses

this didn't put obscufated classes on a particular package, but this is what I intended to do, the remaining packages you see there are the ones I've explicitly kept, also if you have resources (files) embedded in a package those would still be retained in it original package structure but their obscufated .class files will be moved to the root

Update 1

yes you can, code below will move obfuscated classes from root to package a.a

-repackageclasses a/a

enter image description here

Upvotes: 5

Related Questions