Changeset 3091 in josm for trunk/build.xml


Ignore:
Timestamp:
2010-03-06T17:27:45+01:00 (9 years ago)
Author:
jttt
Message:

Added ProGuard tool (see #4640)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/build.xml

    r3026 r3091  
    55**    ant clean
    66**    ant dist
    7 ** This will create 'josm-custom.jar'  in directory 'dist'. See also 
     7** This will create 'josm-custom.jar'  in directory 'dist'. See also
    88**   https://josm.openstreetmap.de/wiki/CreateBuild
    9 ** 
    10 ** 
     9**
     10**
    1111-->
    1212<project name="josm" default="dist" basedir=".">
     
    3030
    3131        <!--
    32           ** Used by Eclipse ant builder for updating 
     32          ** Used by Eclipse ant builder for updating
    3333          ** the REVISION file used by JOSM
    3434        -->
     
    5858                <mkdir dir="${revision.dir}" />
    5959                <echo file="${revision.dir}/REVISION">
    60 # automatically generated by JOSM build.xml - do not edit                       
     60# automatically generated by JOSM build.xml - do not edit
    6161Revision: ${version.entry.commit.revision}
    6262Is-Local-Build: true
    63 Build-Date: ${build.tstamp}             
     63Build-Date: ${build.tstamp}
    6464</echo>
    6565        </target>
     
    184184        </target>
    185185
     186        <target name="dist-optimized" depends="dist">
     187                <taskdef resource="proguard/ant/task.properties" classpath="tools/proguard.jar" />
     188                <proguard>
     189                -injars dist/josm-custom.jar
     190                -outjars dist/josm-custom-optimized.jar
     191
     192                -libraryjars ${java.home}/lib/rt.jar
     193                -libraryjars ${java.home}/lib/jce.jar
     194
     195                -dontoptimize
     196                -dontobfuscate
     197
     198                -keepclasseswithmembers public class org.openstreetmap.josm.gui.MainApplication {
     199                    public static void main(java.lang.String[]);
     200                }
     201
     202                -keep class JOSM
     203                -keep class * extends org.openstreetmap.josm.io.FileImporter
     204                -keep class * extends org.openstreetmap.josm.io.FileExporter
     205                -keep class org.openstreetmap.josm.actions.search.SearchCompiler$Never
     206
     207                -keepclassmembers enum  * {
     208                    public static **[] values();
     209                    public static ** valueOf(java.lang.String);
     210                }
     211
     212                -keepclassmembers class * {
     213                    public protected *;
     214                }
     215                </proguard>
     216        </target>
     217
    186218</project>
Note: See TracChangeset for help on using the changeset viewer.