Commit 366f7db5 authored by Evan W. Patton's avatar Evan W. Patton Committed by Jeffrey Schiller

Merge annotation processors into a single step

Change-Id: I0c25b6a01f60830908058bdab1866c12314e642e
parent 9ae9b122
...@@ -73,10 +73,7 @@ ...@@ -73,10 +73,7 @@
<target name="CheckDocs"> <target name="CheckDocs">
<uptodate property="Docs.uptodate"> <uptodate property="Docs.uptodate">
<srcfiles dir="${appinventor.dir}/docs/markdown"> <srcfiles dir="${appinventor.dir}/docs/markdown">
<exclude name="_layouts/*" /> <include name="reference/**/*" />
<exclude name="Gemfile*" />
<exclude name="_config.yml" />
<exclude name=".sass-cache/**/*" />
</srcfiles> </srcfiles>
<firstmatchmapper> <firstmatchmapper>
<globmapper from="*.md" to="${appinventor.dir}/docs/html/*.html" /> <globmapper from="*.md" to="${appinventor.dir}/docs/html/*.html" />
...@@ -88,7 +85,7 @@ ...@@ -88,7 +85,7 @@
<!-- ===================================================================== <!-- =====================================================================
Builds the documentation from the corresponding Markdown files. Builds the documentation from the corresponding Markdown files.
===================================================================== --> ===================================================================== -->
<target name="BuildDocs" depends="components_Markdown,CheckDocs" <target name="BuildDocs" depends="components_AndroidRuntime,CheckDocs"
unless="Docs.uptodate"> unless="Docs.uptodate">
<!-- Jenkins will pass -Dforce.builddocs=true to ensure docs build correctly --> <!-- Jenkins will pass -Dforce.builddocs=true to ensure docs build correctly -->
<property name="force.builddocs" value="false" /> <property name="force.builddocs" value="false" />
...@@ -498,7 +495,7 @@ ...@@ -498,7 +495,7 @@
===================================================================== --> ===================================================================== -->
<target name="AiClientLib" <target name="AiClientLib"
description="App Inventor Client library - compile java source to bytecode" description="App Inventor Client library - compile java source to bytecode"
depends="common_CommonUtils,common_CommonVersion,components_CommonConstants,components_JsonComponentDescription,components_ComponentTranslation"> depends="components_AndroidRuntime">
<mkdir dir="${build.war.dir}/WEB-INF/classes"/> <mkdir dir="${build.war.dir}/WEB-INF/classes"/>
<ai.javac encoding="utf-8" <ai.javac encoding="utf-8"
destdir="${build.war.dir}/WEB-INF/classes" destdir="${build.war.dir}/WEB-INF/classes"
......
...@@ -17,13 +17,13 @@ ...@@ -17,13 +17,13 @@
In-browser blocks editor for App Inventor based on Blockly In-browser blocks editor for App Inventor based on Blockly
</description> </description>
<target name="all" <target name="all"
depends="BlocklyCompile, BlocklyTestbed"> depends="BlocklyCompile">
</target> </target>
<target name="tests" <target name="tests"
depends="BlocklyeditorTests"> depends="BlocklyTestbed, BlocklyeditorTests">
</target> </target>
<!-- ===================================================================== <!-- =====================================================================
Import common directory, task, and target definitions. Import common directory, task, and target definitions.
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
<target name="BlocklyTestbed" <target name="BlocklyTestbed"
description="Testbed for blockly code generation. To use this, open blocklyeditor/src/demos/yail/index.html (using a file:/// url) in a browser" description="Testbed for blockly code generation. To use this, open blocklyeditor/src/demos/yail/index.html (using a file:/// url) in a browser"
depends="components_JsonComponentDescription, common_CommonTestUtils"> depends="components_AndroidRuntime, common_CommonTestUtils">
<mkdir dir="${run.lib.dir}" /> <mkdir dir="${run.lib.dir}" />
<echo message="var componentTypeJson = " file="${public.build.dir}/component-types.js" /> <echo message="var componentTypeJson = " file="${public.build.dir}/component-types.js" />
......
...@@ -272,16 +272,6 @@ ...@@ -272,16 +272,6 @@
<!-- targets that build dependencies --> <!-- targets that build dependencies -->
<!-- ====================================================================
blockseditor_BlocksEditor builds:
- build/blockseditor/BlocksEditor.jar
==================================================================== -->
<target name="blockseditor_BlocksEditor">
<ant inheritAll="false" useNativeBasedir="true" dir="${appinventor.dir}/blockseditor"
target="BlocksEditor"/>
</target>
<!-- ==================================================================== <!-- ====================================================================
blocklyeditor_BlocklyCompile builds: blocklyeditor_BlocklyCompile builds:
- build/blockly-all.js - build/blockly-all.js
...@@ -292,41 +282,6 @@ ...@@ -292,41 +282,6 @@
target="BlocklyCompile"/> target="BlocklyCompile"/>
</target> </target>
<!-- ====================================================================
components_ComponentTranslation builds:
common/build/src/com/google/appinventor/ComponentsTranslation.java
==================================================================== -->
<target name="components_ComponentTranslation">
<ant inheritAll="false" useNativeBaseDir="true" dir="${appinventor.dir}/components"
target="ComponentTranslation"/>
</target>
<target name="components_Markdown">
<ant inheritAll="false" useNativeBaseDir="true" dir="${appinventor.dir}/components"
target="Markdown"/>
</target>
<!-- ====================================================================
buildserver_StarterApp builds:
- build/buildserver/AppInventorPhoneApp.apk
==================================================================== -->
<target name="buildserver_StarterApp">
<ant inheritAll="false" useNativeBasedir="true" dir="${appinventor.dir}/buildserver"
target="StarterApp"/>
</target>
<!-- ====================================================================
common_CommonTranslations builds:
- build/common/CommonTranslations.jar
==================================================================== -->
<target name="common_CommonTranslations">
<ant inheritAll="false" useNativeBasedir="true" dir="${appinventor.dir}/common"
target="CommonTranslations"/>
</target>
<!-- ==================================================================== <!-- ====================================================================
common_CommonUtils builds: common_CommonUtils builds:
- build/common/CommonUtils.jar - build/common/CommonUtils.jar
...@@ -369,16 +324,6 @@ ...@@ -369,16 +324,6 @@
target="AndroidRuntime"/> target="AndroidRuntime"/>
</target> </target>
<!-- ====================================================================
components_Barcode builds:
- build/components/Barcode.jar
==================================================================== -->
<target name="components_Barcode">
<ant inheritAll="false" useNativeBasedir="true" dir="${appinventor.dir}/components"
target="Barcode"/>
</target>
<!-- ==================================================================== <!-- ====================================================================
components_CommonConstants builds: components_CommonConstants builds:
- build/components/CommonConstants.jar - build/components/CommonConstants.jar
...@@ -390,25 +335,4 @@ ...@@ -390,25 +335,4 @@
target="CommonConstants"/> target="CommonConstants"/>
</target> </target>
<!-- ====================================================================
components_ComponentList builds:
- build/components/simple_components.txt
- build/components/simple_components_build_info.json
==================================================================== -->
<target name="components_ComponentList">
<ant inheritAll="false" useNativeBasedir="true" dir="${appinventor.dir}/components"
target="ComponentList"/>
</target>
<!-- ====================================================================
components_JsonComponentDescription builds:
- build/components/simple_components.json
==================================================================== -->
<target name="components_JsonComponentDescription">
<ant inheritAll="false" useNativeBasedir="true" dir="${appinventor.dir}/components"
target="JsonComponentDescription"/>
</target>
</project> </project>
...@@ -48,8 +48,7 @@ ...@@ -48,8 +48,7 @@
the jars needed to compile the build server classes. the jars needed to compile the build server classes.
===================================================================== --> ===================================================================== -->
<target name="BuildServer" <target name="BuildServer"
depends="init,CopyToRunLibDir,components_AndroidRuntime,components_Barcode,components_ComponentList, depends="init,CopyToRunLibDir,components_AndroidRuntime">
components_JsonComponentDescription">
<property name="BuildServer-class.dir" location="${class.dir}/BuildServer" /> <property name="BuildServer-class.dir" location="${class.dir}/BuildServer" />
<mkdir dir="${BuildServer-class.dir}" /> <mkdir dir="${BuildServer-class.dir}" />
...@@ -65,7 +64,7 @@ ...@@ -65,7 +64,7 @@
<copy todir="${classes.files.dir}" flatten="true"> <copy todir="${classes.files.dir}" flatten="true">
<fileset dir="${src.dir}/${buildserver.pkg}/resources" includes="*"/> <fileset dir="${src.dir}/${buildserver.pkg}/resources" includes="*"/>
<fileset dir="${build.dir}/components" <fileset dir="${build.dir}/components"
includes="AndroidRuntime.jar,Barcode.jar,simple_components.txt,simple_components_build_info.json,simple_components.json"/> includes="AndroidRuntime.jar,simple_components.txt,simple_components_build_info.json,simple_components.json"/>
<!-- Map assets for build server --> <!-- Map assets for build server -->
<fileset dir="${lib.dir}/leaflet" includes="leaflet.js,leaflet.css" /> <fileset dir="${lib.dir}/leaflet" includes="leaflet.js,leaflet.css" />
<fileset dir="${lib.dir}/leaflet/assets" includes="*"/> <fileset dir="${lib.dir}/leaflet/assets" includes="*"/>
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</description> </description>
<target name="all" <target name="all"
depends="CommonUtils,CommonVersion,CommonTestUtils"> depends="CommonUtils,CommonVersion">
</target> </target>
<target name="tests" <target name="tests"
...@@ -60,24 +60,6 @@ ...@@ -60,24 +60,6 @@
</target> </target>
<!-- =====================================================================
CommonTranslations: library containing translation classes.
===================================================================== -->
<target name="CommonTranslations"
description="Generate library containing translation classes"
depends="init">
<property name="CommonTranslations-class.dir" location="${class.dir}/CommonTranslations" />
<mkdir dir="${CommonTranslations-class.dir}" />
<ai.javac destdir="${CommonTranslations-class.dir}">
<include name="${common.pkg}/translations/*.java" />
</ai.javac>
<jar destfile="${public.build.dir}/CommonTranslations.jar">
<fileset dir="${CommonTranslations-class.dir}"/>
</jar>
</target>
<!-- ===================================================================== <!-- =====================================================================
CommonUtilsTests: build and run the CommonUtils tests and generate the output results CommonUtilsTests: build and run the CommonUtils tests and generate the output results
===================================================================== --> ===================================================================== -->
......
This diff is collapsed.
com.google.appinventor.components.scripts.ComponentDescriptorGenerator
com.google.appinventor.components.scripts.ComponentListGenerator
com.google.appinventor.components.scripts.ComponentTranslationGenerator
com.google.appinventor.components.scripts.MarkdownDocumentationGenerator
...@@ -52,6 +52,7 @@ import javax.annotation.processing.AbstractProcessor; ...@@ -52,6 +52,7 @@ import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.Messager; import javax.annotation.processing.Messager;
import javax.annotation.processing.ProcessingEnvironment; import javax.annotation.processing.ProcessingEnvironment;
import javax.annotation.processing.RoundEnvironment; import javax.annotation.processing.RoundEnvironment;
import javax.lang.model.SourceVersion;
import javax.lang.model.element.AnnotationMirror; import javax.lang.model.element.AnnotationMirror;
import javax.lang.model.element.AnnotationValue; import javax.lang.model.element.AnnotationValue;
import javax.lang.model.element.AnnotationValueVisitor; import javax.lang.model.element.AnnotationValueVisitor;
...@@ -862,6 +863,11 @@ public abstract class ComponentProcessor extends AbstractProcessor { ...@@ -862,6 +863,11 @@ public abstract class ComponentProcessor extends AbstractProcessor {
return SUPPORTED_ANNOTATION_TYPES; return SUPPORTED_ANNOTATION_TYPES;
} }
@Override
public SourceVersion getSupportedSourceVersion() {
return SourceVersion.RELEASE_7;
}
@Override @Override
public void init(ProcessingEnvironment processingEnv) { public void init(ProcessingEnvironment processingEnv) {
super.init(processingEnv); super.init(processingEnv);
...@@ -935,8 +941,8 @@ public abstract class ComponentProcessor extends AbstractProcessor { ...@@ -935,8 +941,8 @@ public abstract class ComponentProcessor extends AbstractProcessor {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
// Indicate that we have successfully handled the annotations. // We need to return false here so that sibling annotation processors can run
return true; return false;
} }
/* /*
......
...@@ -19,3 +19,5 @@ out/ ...@@ -19,3 +19,5 @@ out/
*.pyc *.pyc
.vagrant/ .vagrant/
*.log *.log
.build/
.jekyll-cache/
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment