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 @@
<target name="CheckDocs">
<uptodate property="Docs.uptodate">
<srcfiles dir="${appinventor.dir}/docs/markdown">
<exclude name="_layouts/*" />
<exclude name="Gemfile*" />
<exclude name="_config.yml" />
<exclude name=".sass-cache/**/*" />
<include name="reference/**/*" />
</srcfiles>
<firstmatchmapper>
<globmapper from="*.md" to="${appinventor.dir}/docs/html/*.html" />
......@@ -88,7 +85,7 @@
<!-- =====================================================================
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">
<!-- Jenkins will pass -Dforce.builddocs=true to ensure docs build correctly -->
<property name="force.builddocs" value="false" />
......@@ -498,7 +495,7 @@
===================================================================== -->
<target name="AiClientLib"
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"/>
<ai.javac encoding="utf-8"
destdir="${build.war.dir}/WEB-INF/classes"
......
......@@ -17,13 +17,13 @@
In-browser blocks editor for App Inventor based on Blockly
</description>
<target name="all"
depends="BlocklyCompile, BlocklyTestbed">
</target>
<target name="all"
depends="BlocklyCompile">
</target>
<target name="tests"
depends="BlocklyeditorTests">
</target>
<target name="tests"
depends="BlocklyTestbed, BlocklyeditorTests">
</target>
<!-- =====================================================================
Import common directory, task, and target definitions.
......@@ -81,7 +81,7 @@
<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"
depends="components_JsonComponentDescription, common_CommonTestUtils">
depends="components_AndroidRuntime, common_CommonTestUtils">
<mkdir dir="${run.lib.dir}" />
<echo message="var componentTypeJson = " file="${public.build.dir}/component-types.js" />
......
......@@ -272,16 +272,6 @@
<!-- 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:
- build/blockly-all.js
......@@ -292,41 +282,6 @@
target="BlocklyCompile"/>
</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:
- build/common/CommonUtils.jar
......@@ -369,16 +324,6 @@
target="AndroidRuntime"/>
</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:
- build/components/CommonConstants.jar
......@@ -390,25 +335,4 @@
target="CommonConstants"/>
</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>
......@@ -48,8 +48,7 @@
the jars needed to compile the build server classes.
===================================================================== -->
<target name="BuildServer"
depends="init,CopyToRunLibDir,components_AndroidRuntime,components_Barcode,components_ComponentList,
components_JsonComponentDescription">
depends="init,CopyToRunLibDir,components_AndroidRuntime">
<property name="BuildServer-class.dir" location="${class.dir}/BuildServer" />
<mkdir dir="${BuildServer-class.dir}" />
......@@ -65,7 +64,7 @@
<copy todir="${classes.files.dir}" flatten="true">
<fileset dir="${src.dir}/${buildserver.pkg}/resources" includes="*"/>
<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 -->
<fileset dir="${lib.dir}/leaflet" includes="leaflet.js,leaflet.css" />
<fileset dir="${lib.dir}/leaflet/assets" includes="*"/>
......
......@@ -13,7 +13,7 @@
</description>
<target name="all"
depends="CommonUtils,CommonVersion,CommonTestUtils">
depends="CommonUtils,CommonVersion">
</target>
<target name="tests"
......@@ -60,24 +60,6 @@
</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
===================================================================== -->
......
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;
import javax.annotation.processing.Messager;
import javax.annotation.processing.ProcessingEnvironment;
import javax.annotation.processing.RoundEnvironment;
import javax.lang.model.SourceVersion;
import javax.lang.model.element.AnnotationMirror;
import javax.lang.model.element.AnnotationValue;
import javax.lang.model.element.AnnotationValueVisitor;
......@@ -862,6 +863,11 @@ public abstract class ComponentProcessor extends AbstractProcessor {
return SUPPORTED_ANNOTATION_TYPES;
}
@Override
public SourceVersion getSupportedSourceVersion() {
return SourceVersion.RELEASE_7;
}
@Override
public void init(ProcessingEnvironment processingEnv) {
super.init(processingEnv);
......@@ -935,8 +941,8 @@ public abstract class ComponentProcessor extends AbstractProcessor {
throw new RuntimeException(e);
}
// Indicate that we have successfully handled the annotations.
return true;
// We need to return false here so that sibling annotation processors can run
return false;
}
/*
......
......@@ -19,3 +19,5 @@ out/
*.pyc
.vagrant/
*.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