Question

Is proguard able to safely* downgrade class files from Java 6 to Java 1.4 or do I need to also run Retroweaver?

I want to be able to use some compile-time features of Java 6 such as Generics and Annotations, but I unfortunately need to allow my application to run on Java 1.4.2. Is proguard able to do this by using the flag -target 1.4?

*By safely, I mean that it pre-verifies them and checks they will run on 1.4 so I don't have to test my application on that version every time I make a change.

Était-ce utile?

La solution

ProGuard's -target option just sets the version number in the class files. It doesn't modify or check the actual code to make sure it is compatible. The most useful application is upgrading class files to Java 1.6 (-target 1.6), in which case ProGuard's preverification step adds the required preverification attributes (still without changing the actual code). So yes, you'll need another tool like Retroweaver for downgrading to Java 1.4.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top