forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 975622 - Part 2: Add post builder. r=bnicholson
- Loading branch information
Showing
3 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
...build/mozbuild/backend/templates/android_eclipse/.externalToolBuilders/PostBuilder.launch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#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="${build_type}" -Dbuild_files="DUMMY ${build_files}""/> | ||
</launchConfiguration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
python/mozbuild/mozbuild/backend/templates/android_eclipse/post_build.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#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> |