Reviewers: fabbott, Description: Right now about one in a hundred builds or so api checker will break, this patch creates a convenient target to programmers making changes to user can run the tests, api checker, and the checkstyle checks as one command.
It also fixed our checkstyle config by making it only fail on errors and to put its output in a separate directory. Please review this at http://gwt-code-reviews.appspot.com/2006 Affected files: build.xml common.ant.xml user/build.xml Index: build.xml =================================================================== --- build.xml (revision 4441) +++ build.xml (working copy) @@ -71,7 +71,7 @@ <delete dir="${gwt.build}" /> </target> - <target name="apicheck" depends="build" + <target name="gwt.apicheck" description="Checks API compatibility to prior GWT revision"> <copy tofile="${gwt.build.out}/userApi.conf" filtering="false" file="${gwt.apicheck.config}" @@ -96,5 +96,30 @@ <arg file="${gwt.build.out}/userApi.conf"/> </java> </target> - + + <target name="apicheck" depends="build,gwt.apicheck" + description="Checks API compatibility to prior GWT revision"> + <copy tofile="${gwt.build.out}/userApi.conf" filtering="false" + file="${gwt.apicheck.config}" + overwrite="true"> + <filterset> + <filter token="OLDROOT" + value="${gwt.apicheck.oldroot}"/> + </filterset> + </copy> + <java failonerror="true" fork="true" + classname="com.google.gwt.tools.apichecker.ApiCompatibilityChecker"> + <jvmarg line="-Xmx512m" /> + <sysproperty key="gwt.devjar" value="${gwt.dev.staging.jar}" /> + <classpath> + <pathelement location="${gwt.build.out}/tools/api-checker/bin"/> + <pathelement location="${gwt.build.out}/dev/core/bin"/> + <pathelement location="${gwt.build.out}/user/bin"/> + <pathelement location="${gwt.tools.lib}/eclipse/jdt-3.3.1.jar"/> + <pathelement path="${java.class.path}"/> + </classpath> + <arg value="-configFile"/> + <arg file="${gwt.build.out}/userApi.conf"/> + </java> + </target> </project> Index: common.ant.xml =================================================================== --- common.ant.xml (revision 4441) +++ common.ant.xml (working copy) @@ -252,7 +252,8 @@ <element name="sourcepath" implicit="yes" optional="true" /> <sequential> <taskdef resource="checkstyletask.properties" classpath="${gwt.tools.antlib}/checkstyle-all-4.2.jar;${gwt.build.lib}/gwt-customchecks.jar" /> - <checkstyle config="${gwt.root}/eclipse/settings/code-style/gwt-checkstyle.xml" maxWarnings="0"> + <checkstyle config="${gwt.root}/eclipse/settings/code-style/gwt-checkstyle.xml" maxErrors="0"> + <formatter type="xml" toFile="${project.build}/checkstyle_errors.xml"/> <property key="checkstyle.header.file" file="${gwt.root}/eclipse/settings/code-style/google.header" /> <sourcepath /> </checkstyle> Index: user/build.xml =================================================================== --- user/build.xml (revision 4441) +++ user/build.xml (working copy) @@ -133,5 +133,7 @@ <delete dir="${project.build}" /> <delete file="${project.lib}" /> </target> - + <target name="snifftest" depends="test, checkstyle" description="runs the gwt api checker, user checkstyle, and user tests"> + <gwt.ant dir=".." target="gwt.apicheck"/> + </target> </project> --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---