How can I force Proguard to keep my .xml resource file?

I am succesfully using proguard for my Android apps.

However, with one app I am having trouble.

This app uses a java library that has a .xml file that is stored in the package.

InputStream istream = Library.class.getResourceAsStream("resource.xml");

This library works great when proguard is disabled. However, running proguard, it seems that the xml file is just completely stripped away.

Relevant proguard.cfg

-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
#-dontobfuscate
#-repackageclasses '' //THIS IS DISABLED
-keepattributes *Annotation*
-keepattributes Signature
-verbose
-dontwarn roboguice.activity.RoboMapActivity
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*

Any ideas on how to force keep this xml file?

13
задан Peterdk 1 May 2011 в 15:41
поделиться