You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project name="common" basedir="." default="" xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:antcontrib="antlib:net.sf.antcontrib" xmlns:cs="antlib:com.puppycrawl.tools.checkstyle">
  3. <tstamp>
  4. <format property="build.date" pattern="yyyy-MM-dd" />
  5. </tstamp>
  6. <dirname property="vaadin.basedir" file="${ant.file.common}" />
  7. <property file="${vaadin.basedir}/build.properties" />
  8. <ivy:settings file="${vaadin.basedir}/ivysettings.xml" />
  9. <ivy:settings file="${vaadin.basedir}/ivysettings.xml" id="ivysettings" />
  10. <ivy:resolve log="download-only" file="${vaadin.basedir}/ivy-taskdefs.xml" conf="taskdefs" />
  11. <ivy:cachepath pathid="taskdefs.classpath" conf="taskdefs" />
  12. <taskdef uri="antlib:net.sf.antcontrib" resource="net/sf/antcontrib/antlib.xml" classpathref="taskdefs.classpath" />
  13. <!-- Checkstyle conf -->
  14. <property name="cs.dir" location="${vaadin.basedir}/checkstyle" />
  15. <property name="cs.xml" location="${cs.dir}/vaadin-checkstyle.xml" />
  16. <property name="cs.header-file" location="${cs.dir}/header" />
  17. <property name="cs.import-control-file" location="${cs.dir}/import-control.xml" />
  18. <taskdef resource="checkstyletask.properties" uri="antlib:com.puppycrawl.tools.checkstyle" classpathref="taskdefs.classpath" />
  19. <target name="checkstyle">
  20. <fail unless="result.dir" message="No result.dir parameter given" />
  21. <fail unless="cs.src" message="No cs.src parameter given" />
  22. <property name="result.dir.full" location="${result.dir}" />
  23. <mkdir dir="${result.dir}" />
  24. <echo>##teamcity[importData type='checkstyle' path='${result.dir.full}/checkstyle-errors.xml']</echo>
  25. <cs:checkstyle config="${cs.xml}" failOnViolation="false">
  26. <fileset dir="${cs.src}" includes="**/*.java">
  27. <exclude name="com/vaadin/sass/internal/parser/Parser.java" />
  28. <exclude name="com/vaadin/sass/internal/parser/ParserConstants.java" />
  29. <exclude name="com/vaadin/sass/internal/parser/ParserTokenManager.java" />
  30. </fileset>
  31. <formatter type="xml" toFile="${result.dir}/checkstyle-errors.xml" />
  32. <property key="checkstyle.header.file" file="${cs.header-file}" />
  33. <property key="checkstyle.importControl.file" file="${cs.import-control-file}" />
  34. </cs:checkstyle>
  35. </target>
  36. </project>