Java Question Proguard for Eclipse libs for b4a

kepler

Active Member
Licensed User
Longtime User
Hi,

I'm not sure if this is the right place to ask this question. But maybe someone can help.

I've got several libs in Java made in Eclipse Kepler with the interface for usage in B4A.
I'm currently trying to shrink and protect their code with Proguard - using the GUI tool (I can't seem to be able to introduce it in Eclipse directly). I've read the manuals.

But, when using Proguard I get immediatly problems with the b4a shared library and with javax.swing...

Does anyone has a clue how to configure the proguard.pro file in order that this doesn't happen?

Kind regards,

Kepler
 

kepler

Active Member
Licensed User
Longtime User
Hi Erel,

Yes, I do realize that. The fact is that the libs run perfectly in B4A - no problem there. But when I try the obfuscation in the Proguard GUI I get an automated error regardind B4AShared (not Core). I just added that it appeared also something related to swing...but I think that if I can solve the problem with the shared b4a, I can solve the "swing" problem...whatever that is.

And of course I must maintain the main procedures available for b4a understands them.

Kind regards,

Kepler
 

kepler

Active Member
Licensed User
Longtime User
Hi,

You might be right.
IF I disable the shrink option - at least the general one - and add this lines:

-libraryjars 'C:\Program Files\Android\android-sdk\platforms\android-8\android.jar'
-libraryjars 'C:\Program Files\Anywhere Software\Basic4android\Libraries\B4AShared.jar'

-keep public class com.google.vending.licensing.ILicensingService
-keep public class com.android.vending.licensing.ILicensingService
-keep public class anywheresoftware.b4a.*
-keep class javax.** {
<fields>;
<methods>;
}

I get, at least, an obfuscated code. Reversing it, gives a good clean code, but with all the variables replaced/scrambled.

I might be in the right way...

I'll test the jar, and let you know. Thanks Erel :)

Kind regards,

Kepler
 
Top