summaryrefslogtreecommitdiffstats
path: root/theme-compiler
diff options
context:
space:
mode:
authorJohannes Dahlström <johannesd@vaadin.com>2013-11-29 11:34:00 +0200
committerJohannes Dahlström <johannesd@vaadin.com>2013-11-29 11:34:01 +0200
commitde1c343ea9079f74276484c7d5f1623b5391eaba (patch)
tree4088497665be64b9b907ddeb4e30de7e807757c2 /theme-compiler
parentdd7e6fee8c4717df59699f04f7e72a6f2e92008f (diff)
parent012e649775e7efbcbbdd9d1c3ef4edd9c9acb71a (diff)
downloadvaadin-framework-de1c343ea9079f74276484c7d5f1623b5391eaba.tar.gz
vaadin-framework-de1c343ea9079f74276484c7d5f1623b5391eaba.zip
Merge changes from origin/7.1
84521fa Use correct type for UIDL value to avoid development mode problems (#12545) 3680505 Ensure generated parser is re-generated during build (#12937) f3fa6af Regenerated parser files (#12937) 011a2a0 Do not generate ParseException as it has been customized (#12937) 9be3b40 Workaround for missing value change event in chrome (#10109) 48034f6 Ensure alternate text is still visible (#11780) cbc9949 Added test case for #12726 07b1a9d Prevents accidental selection of window caption or content. (#12726) e05e10e Added extra asserts to make test more safer to blind refactorings 33e5897 Use localhost when running locally to avoid potential network issues 642818f Allow using @RunLocally to run on a local Firefox/Chrome/Safari 81a1c29 Revert "Fixed lost scrollLeft when row count changed in Table (#12652)." dde6a48 Output test results in XML reports instead of to standard output 012e649 Fix TB3 local testing and occasionally failing SliderDisableTest. Change-Id: I4f4e44e887e7e90dd04e6d7381280a997e9527cc
Diffstat (limited to 'theme-compiler')
-rw-r--r--theme-compiler/apache2header.txt15
-rw-r--r--theme-compiler/build.xml28
2 files changed, 40 insertions, 3 deletions
diff --git a/theme-compiler/apache2header.txt b/theme-compiler/apache2header.txt
new file mode 100644
index 0000000000..5e94497098
--- /dev/null
+++ b/theme-compiler/apache2header.txt
@@ -0,0 +1,15 @@
+/*
+ * Copyright 2000-2013 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
diff --git a/theme-compiler/build.xml b/theme-compiler/build.xml
index 9141605fbf..03d0531a68 100644
--- a/theme-compiler/build.xml
+++ b/theme-compiler/build.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<project name="vaadin-theme-compiler" basedir="." default="publish-local" xmlns:ivy="antlib:org.apache.ivy.ant">
+<project name="vaadin-theme-compiler" basedir="." default="publish-local" xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:antcontrib="antlib:net.sf.antcontrib">
<description>
Compiles build helpers used when building other modules.
</description>
@@ -12,7 +12,10 @@
<property name="module.name" value="vaadin-theme-compiler" />
<property name="module.symbolic" value="com.vaadin.theme-compiler" />
<property name="result.dir" value="result" />
- <property name="sass.parser.jj" location="src/com/vaadin/sass/internal/parser/Parser.jj" />
+ <property name="parser.src.dir" value="src/com/vaadin/sass/internal/parser" />
+ <property name="generate.dir" value="${result.dir}/generated/${parser.src.dir}" />
+ <property name="header.file" location="apache2header.txt" />
+
<path id="classpath.compile.custom">
</path>
<path id="classpath.test.custom" />
@@ -25,8 +28,27 @@
javacc task requires the jar to be named javacc.jar -->
<property name="javacc.home" location="${result.dir}/javacc" />
<ivy:retrieve organisation="net.java.dev.javacc" module="javacc" revision="5.0" inline="true" type="jar" pattern="${javacc.home}/[artifact].[ext]" />
- <javacc target="${sass.parser.jj}" javacchome="${javacc.home}">
+ <delete dir="${generate.dir}" />
+ <mkdir dir="${generate.dir}" />
+ <!-- Generate new parser files in another directory, this ensure
+ they are always generated -->
+ <copy file="${parser.src.dir}/Parser.jj" todir="${generate.dir}" />
+ <javacc target="${generate.dir}/Parser.jj" javacchome="${javacc.home}">
</javacc>
+ <!-- Add headers to the generated files and copy back to src -->
+ <antcontrib:foreach target="prepend.generated.file.header" param="path">
+ <path>
+ <fileset dir="${generate.dir}" includes="*.java" excludes="ParseException.java" />
+ </path>
+ </antcontrib:foreach>
+ </target>
+
+ <target name="prepend.generated.file.header">
+ <basename property="file" file="${path}" />
+ <concat destfile="${parser.src.dir}/${file}">
+ <header filtering="no" trimleading="no" file="${header.file}" />
+ <path path="${generate.dir}/${file}" />
+ </concat>
</target>
<target name="jar" depends="parser">