Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple configuration files for the ProGuard Ant task

Tags:

proguard

ant

I am using the ProGuard ant task, and everything is great, except that my ProGuard configuration file is huge. Also, different tasks use different ProGuard configuration files, and there is a lot of copy-pasting that I would like to refactor into separate .pro files.

<taskdef resource="proguard/ant/task.properties" classpath="C:/Program Files/proguard4.7/lib/proguard.jar"/>
<target name="obfuscated_jar" depends="raw_jar">
    <proguard configuration="core.pro lib1.pro lib2.pro">
        <outjar path="prog_obfuscated.jar"/>
    </proguard>
</target>

The above doesn't work, because it treats the multiple .pro files as one big filename. I'm a known idiot w.r.t. ant, am I missing something obvious? Thanks!

like image 549
Ned Twigg Avatar asked Dec 13 '25 15:12

Ned Twigg


1 Answers

You can create a single main .pro file that contains -include options pointing to your actual .pro files.

like image 87
Eric Lafortune Avatar answered Dec 15 '25 16:12

Eric Lafortune



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!