proguardobfuscationandroid-proguard

Does proguard support regex for input jars


I have one .pro file which has inputs jars mentioned as below: -injars \plugins\a.b.c_1.0.0.201803060704.jar

trying to provide -injars \plugins\a.b.c_1.?.?..jar or a.b.c_.jar but proguard is not recognizing it. getting an error as (No such file or directory).

The basic question is does proguard support regex in -injars section?


Solution

  • Yes, there's a glob style pattern matching called filtering. No, it doesn't look like it's supported for -injars (I tried using their filter syntax both with and without single quotes).

    I wasn't able to use their file filtering in the proguard.cfg file loaded by maven for the -injars flag. So, not sure where all it's supported or exactly how it's implemented for files.

    ?   matches any single character in a file name.
    *   matches any part of a filename not containing the directory separator.
    **  matches any part of a filename, possibly containing any number of directory separators.
    
    For example, "java/**.class,javax/**.class" 
    matches all class files in the java and javax. 
    

    http://www.dre.vanderbilt.edu/~schmidt/android/android-4.0/external/proguard/docs/manual/usage.html#filefilters