Bug 1029232 - Part 3: Call Eclipse builder plugin before Android build steps. r=bnicholson
authorNick Alexander <nalexander@mozilla.com>
Tue, 24 Jun 2014 19:14:35 -0700
changeset 190659 0edc7c486fecc43b4b3010629c6d38db5d395d92
parent 190658 0a0f495093d9eae175dd7d5b52bc32852cba04fd
child 190660 e37a137812f52ebfcf1eab35a4310d27563104cd
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersbnicholson
bugs1029232
milestone33.0a1
Bug 1029232 - Part 3: Call Eclipse builder plugin before Android build steps. r=bnicholson
python/mozbuild/mozbuild/backend/templates/android_eclipse/.externalToolBuilders/PostBuilder.launch
python/mozbuild/mozbuild/backend/templates/android_eclipse/.externalToolBuilders/PreBuilder.launch
python/mozbuild/mozbuild/backend/templates/android_eclipse/.project
python/mozbuild/mozbuild/backend/templates/android_eclipse/post_build.xml
python/mozbuild/mozbuild/backend/templates/android_eclipse/pre_build.xml
deleted file mode 100644
--- a/python/mozbuild/mozbuild/backend/templates/android_eclipse/.externalToolBuilders/PostBuilder.launch
+++ /dev/null
@@ -1,18 +0,0 @@
-#filter substitution
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
-<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_CLEAN_TARGETS" value="post_build,"/>
-<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
-<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
-<booleanAttribute key="org.eclipse.debug.core.capture_output" value="true"/>
-<booleanAttribute key="org.eclipse.debug.ui.ATTR_CONSOLE_OUTPUT_ON" value="true"/>
-<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${project}"/>
-<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="@IDE_PROJECT_NAME@"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/@IDE_PROJECT_NAME@/post_build.xml}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="clean"/>
-<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-Dbuild_type=&quot;${build_type}&quot;&#10;-Dbuild_files=&quot;DUMMY ${build_files}&quot;"/>
-</launchConfiguration>
deleted file mode 100644
--- a/python/mozbuild/mozbuild/backend/templates/android_eclipse/.externalToolBuilders/PreBuilder.launch
+++ /dev/null
@@ -1,19 +0,0 @@
-#filter substitution
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
-<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_AUTO_TARGETS" value="pre_build,"/>
-<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_MANUAL_TARGETS" value="pre_build,"/>
-<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
-<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
-<booleanAttribute key="org.eclipse.debug.core.capture_output" value="true"/>
-<booleanAttribute key="org.eclipse.debug.ui.ATTR_CONSOLE_OUTPUT_ON" value="true"/>
-<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${project}"/>
-<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="@IDE_PROJECT_NAME@"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/@IDE_PROJECT_NAME@/pre_build.xml}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="incremental,auto"/>
-<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-Dbuild_type=&quot;${build_type}&quot;&#10;-Dbuild_files=&quot;DUMMY ${build_files}&quot;"/>
-</launchConfiguration>
--- a/python/mozbuild/mozbuild/backend/templates/android_eclipse/.project
+++ b/python/mozbuild/mozbuild/backend/templates/android_eclipse/.project
@@ -2,21 +2,25 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
 	<name>@IDE_PROJECT_NAME@</name>
 	<comment></comment>
 	<projects>
 	</projects>
 	<buildSpec>
 		<buildCommand>
-			<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+			<name>org.mozilla.ide.eclipse.fennec.FennecMakeBuilder</name>
 			<arguments>
 				<dictionary>
-					<key>LaunchConfigHandle</key>
-					<value>&lt;project&gt;/.externalToolBuilders/PreBuilder.launch</value>
+					<key>command</key>
+					<value>@IDE_TOPSRCDIR@/mach build @IDE_OBJDIR@/ANDROID_ECLIPSE_PROJECT_@IDE_PROJECT_NAME@</value>
+				</dictionary>
+				<dictionary>
+					<key>workingDirectory</key>
+					<value>@IDE_TOPOBJDIR@</value>
 				</dictionary>
 			</arguments>
 		</buildCommand>
 		<buildCommand>
 			<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
 			<arguments>
 			</arguments>
 		</buildCommand>
@@ -30,24 +34,15 @@
 			<arguments>
 			</arguments>
 		</buildCommand>
 		<buildCommand>
 			<name>com.android.ide.eclipse.adt.ApkBuilder</name>
 			<arguments>
 			</arguments>
 		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
-			<arguments>
-				<dictionary>
-					<key>LaunchConfigHandle</key>
-					<value>&lt;project&gt;/.externalToolBuilders/PostBuilder.launch</value>
-				</dictionary>
-			</arguments>
-		</buildCommand>
 	</buildSpec>
 	<natures>
 		<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
 		<nature>org.eclipse.jdt.core.javanature</nature>
 	</natures>
 @IDE_PROJECT_FILTERED_RESOURCES@
 </projectDescription>
deleted file mode 100644
--- a/python/mozbuild/mozbuild/backend/templates/android_eclipse/post_build.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-#filter substitution
-<?xml version="1.0" encoding="UTF-8"?>
-<project>
-    <property name="topsrcdir" value="@IDE_TOPSRCDIR@"/>
-    <property name="topobjdir" value="@IDE_TOPOBJDIR@"/>
-    <property name="objdir" value="@IDE_OBJDIR@"/>
-    <property name="project_name" value="@IDE_PROJECT_NAME@"/>
-
-    <!-- This file can get large (!), but for a short time we want to
-         log as much information for debugging build loops as possible. -->
-    <record name="${topobjdir}/android_eclipse/build.log" append="yes" />
-
-    <target name="build_needed" >
-
-        <script language="javascript" >
-<![CDATA[
-  importClass(java.io.File);
-
-  var build_files = project.getProperty("build_files").split(" ");
-  var after = [];
-
-  var echo = project.createTask("echo");
-  var info = Packages.org.apache.tools.ant.taskdefs.Echo.EchoLevel();
-  info.setValue("info");
-  echo.setLevel(info);
-
-  // Timestamp.
-  echo.addText(project.getProperty("project_name") + " build type " + project.getProperty("build_type") + " started at: " + new Date());
-  echo.addText(project.getProperty("line.separator"));
-
-  echo.perform();
-
-  // The if below checks for the property being defined, not its value.
-  project.setProperty("build_needed", build_needed);
-]]>
-        </script>
-    </target>
-
-    <target name="post_build" depends="build_needed" if="build_needed">
-        <exec executable="${topsrcdir}/mach" dir="${topobjdir}" failonerror="true">
-            <arg value="build"/>
-            <arg value="${objdir}/ANDROID_ECLIPSE_PROJECT_${project_name}"/>
-        </exec>
-    </target>
-</project>
deleted file mode 100644
--- a/python/mozbuild/mozbuild/backend/templates/android_eclipse/pre_build.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-#filter substitution
-<?xml version="1.0" encoding="UTF-8"?>
-<project>
-    <property name="topsrcdir" value="@IDE_TOPSRCDIR@"/>
-    <property name="topobjdir" value="@IDE_TOPOBJDIR@"/>
-    <property name="objdir" value="@IDE_OBJDIR@"/>
-    <property name="project_name" value="@IDE_PROJECT_NAME@"/>
-
-    <!-- This file can get large (!), but for a short time we want to
-         log as much information for debugging build loops as possible. -->
-    <record name="${topobjdir}/android_eclipse/build.log" append="yes" />
-
-    <target name="build_needed" >
-
-        <script language="javascript" >
-<![CDATA[
-  importClass(java.io.File);
-
-  var build_files = project.getProperty("build_files").split(" ");
-  var after = [];
-
-  var echo = project.createTask("echo");
-  var info = Packages.org.apache.tools.ant.taskdefs.Echo.EchoLevel();
-  info.setValue("info");
-  echo.setLevel(info);
-
-  // Timestamp.
-  echo.addText(project.getProperty("project_name") + " build type " + project.getProperty("build_type") + " started at: " + new Date());
-  echo.addText(project.getProperty("line.separator"));
-
-  var build_needed = false;
-
-  // Skip leading DUMMY.
-  for (var i = 1; i < build_files.length; i++) {
-    build_file = build_files[i];
-    build_file_needed = true;
-
-    if ((new File(build_file)).isDirectory()) {
-      build_file_needed = false;
-    }
-    var rel = build_file.split(project.getBaseDir(), 2)[1];
-    if (rel && (rel.startsWith("/bin/") || rel.startsWith("/gen/") || rel.endsWith(".class"))) {
-      build_file_needed = false;
-    }
-    if (build_file_needed) {
-      echo.addText("1 ");
-    } else {
-      echo.addText("0 ");
-    }
-    echo.addText(build_file);
-    echo.addText(project.getProperty("line.separator"));
-    build_needed |= build_file_needed;
-  }
-
-  echo.addText(project.getProperty("project_name") + " build type " + project.getProperty("build_type") + " checked at: " + new Date());
-  if (build_needed) {
-    echo.addText(" requires updating");
-  } else {
-    echo.addText(" does not require updating");
-  }
-  echo.addText(project.getProperty("line.separator"));
-
-  echo.perform();
-
-  // The if below checks for the property being defined, not its value.
-  if (build_needed) {
-    project.setProperty("build_needed", build_needed);
-  }
-]]>
-        </script>
-    </target>
-
-    <target name="pre_build" depends="build_needed" if="build_needed">
-        <exec executable="${topsrcdir}/mach" dir="${topobjdir}" failonerror="true">
-            <arg value="build"/>
-            <arg value="${objdir}/ANDROID_ECLIPSE_PROJECT_${project_name}"/>
-        </exec>
-    </target>
-</project>