Author: sp...@google.com Date: Fri Jan 9 06:26:46 2009 New Revision: 4419
Modified: trunk/common.ant.xml trunk/dev/common.ant.xml Log: Run jarjar on gwt-dev-platform.jar, for all three platforms, so that a large number of internal dependencies are renamed to go under com.google.gwt.thirdparty. Review by: fabbott Modified: trunk/common.ant.xml ============================================================================== --- trunk/common.ant.xml (original) +++ trunk/common.ant.xml Fri Jan 9 06:26:46 2009 @@ -39,6 +39,7 @@ <property name="gwt.build.dist" location="${gwt.build}/dist" /> <property name="project.build" location="${gwt.build.out}/${project.tail}" /> <property name="project.lib" location="${gwt.build.lib}/gwt-${ant.project.name}.jar" /> + <property name="project.lib.raw" location="${gwt.build.lib}/gwt-${ant.project.name}-raw.jar" /> <property name="project.jni" location="${gwt.build}/${project.tail}" /> <property name="javac.out" location="${project.build}/bin" /> <property name="javac.junit.out" location="${project.build}/bin-test" /> Modified: trunk/dev/common.ant.xml ============================================================================== --- trunk/dev/common.ant.xml (original) +++ trunk/dev/common.ant.xml Fri Jan 9 06:26:46 2009 @@ -4,6 +4,9 @@ <property.ensure name="gwt.core.root" location="../core" /> <property.ensure name="gwt.core.build" location="${project.build}/../core" /> + + <taskdef name="jarjar" + classname="com.tonicsystems.jarjar.JarJarTask" classpath="${gwt.tools.lib}/tonicsystems/jarjar-1.0rc8.jar"/> <target name="compile" description="Compile all java files"> <mkdir dir="${javac.out}" /> @@ -18,7 +21,8 @@ <target name="build" depends="compile" description="Build and package this project"> <mkdir dir="${gwt.build.lib}" /> - <gwt.jar> + <!-- Use jar instead of gwt.jar here because gwt.jar fixes the destfile --> + <jar destfile="${project.lib.raw}" update="true" duplicate="preserve" index="true" > <fileset dir="src" excludes="**/package.html"/> <fileset dir="${gwt.core.root}/src"> <exclude name="**/package.html"/> @@ -32,12 +36,40 @@ <manifest> <attribute name="Main-Class" value="com.google.gwt.dev.GWTMain" /> </manifest> - </gwt.jar> + </jar> + + <outofdate> + <sourcefiles> + <fileset file="${project.lib.raw}" /> + </sourcefiles> + <targetfiles path="${project.lib}" /> + <sequential> + <jarjar destfile="${project.lib}"> + <zipfileset src="${project.lib.raw}" /> + <!-- Don't rename these packages, because they are actually supplied by external jars --> + <rule pattern="org.xml.**" result="@0" /> + <rule pattern="org.w3c.**" result="@0" /> + <rule pattern="org.omg.**" result="@0" /> + <rule pattern="org.ietf.**" result="@0" /> + + <!-- Don't rename SWT, because it includes native methods --> + <rule pattern="org.eclipse.swt.**" result="@0" /> + + <!-- Don't rename tapestry, because it ends up broken. The problem is + that it computes class names throuh string operations in a way that + jarjar does not understand. --> + <rule pattern="org.apache.tapestry.**" result="@0" /> + + <!-- Put all other org.* packages under com.google.gwt.thirdparty --> + <rule pattern="org.**" result="com.google.gwt.thirdpar...@0" /> + </jarjar> + </sequential> + </outofdate> </target> <target name="clean" description="Cleans this project's intermediate and output files"> <delete dir="${project.build}" failonerror="false" /> + <delete file="${project.lib.raw}" failonerror="false" /> <delete file="${project.lib}" failonerror="false" /> </target> - </project> --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---