| 1 |
<?xml version="1.0"?> |
| 2 |
<recipe> |
| 3 |
|
| 4 |
<#if !(hasDependency('com.android.support:support-v4'))> |
| 5 |
<dependency mavenUrl="com.android.support:support-v4:${buildApi}.+"/> |
| 6 |
</#if> |
| 7 |
|
| 8 |
<#include "../common/recipe_manifest.xml.ftl" /> |
| 9 |
|
| 10 |
<merge from="root/${resIn}/values/strings.xml.ftl" |
| 11 |
to="${escapeXmlAttribute(resOut)}/values/strings.xml" /> |
| 12 |
|
| 13 |
<merge from="root/${resIn}/values/dimens.xml.ftl" |
| 14 |
to="${escapeXmlAttribute(resOut)}/values/dimens.xml" /> |
| 15 |
|
| 16 |
<instantiate from="root/${resIn}/menu/main.xml.ftl" |
| 17 |
to="${escapeXmlAttribute(resOut)}/menu/${menuName}.xml" /> |
| 18 |
|
| 19 |
<#if appCompatActivity> |
| 20 |
<copy from="root/res-buildApi22/drawable" |
| 21 |
to="${escapeXmlAttribute(resOut)}/drawable" /> |
| 22 |
<copy from="root/res-buildApi22/drawable-v21" |
| 23 |
to="${escapeXmlAttribute(resOut)}/drawable<#if includeImageDrawables>-v21</#if>" /> |
| 24 |
|
| 25 |
<#if includeImageDrawables> |
| 26 |
<copy from="root/res-buildApi22/values/drawables.xml" |
| 27 |
to="${escapeXmlAttribute(resOut)}/values/drawables.xml" /> |
| 28 |
</#if> |
| 29 |
|
| 30 |
<#if !(hasDependency('com.android.support:design'))> |
| 31 |
<dependency mavenUrl="com.android.support:design:${buildApi}.+"/> |
| 32 |
</#if> |
| 33 |
|
| 34 |
<#if !(hasDependency('com.android.support:appcompat-v7'))> |
| 35 |
<dependency mavenUrl="com.android.support:appcompat-v7:${buildApi}.+"/> |
| 36 |
</#if> |
| 37 |
|
| 38 |
<#include "../common/recipe_simple.xml.ftl" /> |
| 39 |
|
| 40 |
<#if hasAppBar> |
| 41 |
<#include "../common/recipe_app_bar.xml.ftl" /> |
| 42 |
<#else> |
| 43 |
<#include "../common/recipe_no_actionbar.xml.ftl" /> |
| 44 |
</#if> |
| 45 |
|
| 46 |
<instantiate from="root/res-buildApi22/menu/drawer.xml.ftl" |
| 47 |
to="${escapeXmlAttribute(resOut)}/menu/${drawerMenu}.xml" /> |
| 48 |
|
| 49 |
<instantiate from="root/res-buildApi22/layout/navigation_view.xml.ftl" |
| 50 |
to="${escapeXmlAttribute(resOut)}/layout/${layoutName}.xml" /> |
| 51 |
<instantiate from="root/res-buildApi22/layout/navigation_header.xml.ftl" |
| 52 |
to="${escapeXmlAttribute(resOut)}/layout/${navHeaderLayoutName}.xml" /> |
| 53 |
|
| 54 |
<instantiate from="root/src-buildApi22/app_package/DrawerActivity.java.ftl" |
| 55 |
to="${escapeXmlAttribute(srcOut)}/${activityClass}.java" /> |
| 56 |
|
| 57 |
<open file="${escapeXmlAttribute(srcOut)}/${activityClass}.java" /> |
| 58 |
<open file="${escapeXmlAttribute(resOut)}/layout/${contentLayoutName}.xml" /> |
| 59 |
<#else> |
| 60 |
<!-- TODO: switch on Holo Dark v. Holo Light --> |
| 61 |
<copy from="root/res/drawable-hdpi" |
| 62 |
to="${escapeXmlAttribute(resOut)}/drawable-hdpi" /> |
| 63 |
<copy from="root/res/drawable-mdpi" |
| 64 |
to="${escapeXmlAttribute(resOut)}/drawable-mdpi" /> |
| 65 |
<copy from="root/res/drawable-xhdpi" |
| 66 |
to="${escapeXmlAttribute(resOut)}/drawable-xhdpi" /> |
| 67 |
<copy from="root/res/drawable-xxhdpi" |
| 68 |
to="${escapeXmlAttribute(resOut)}/drawable-xxhdpi" /> |
| 69 |
|
| 70 |
<instantiate from="root/res/menu/global.xml.ftl" |
| 71 |
to="${escapeXmlAttribute(resOut)}/menu/global.xml" /> |
| 72 |
|
| 73 |
<merge from="root/res/values-w820dp/dimens.xml" |
| 74 |
to="${escapeXmlAttribute(resOut)}/values-w820dp/dimens.xml" /> |
| 75 |
|
| 76 |
<instantiate from="root/res/layout/activity_drawer.xml.ftl" |
| 77 |
to="${escapeXmlAttribute(resOut)}/layout/${layoutName}.xml" /> |
| 78 |
<instantiate from="root/res/layout/fragment_navigation_drawer.xml.ftl" |
| 79 |
to="${escapeXmlAttribute(resOut)}/layout/${navigationDrawerLayout}.xml" /> |
| 80 |
<instantiate from="root/res/layout/fragment_simple.xml.ftl" |
| 81 |
to="${escapeXmlAttribute(resOut)}/layout/${fragmentLayoutName}.xml" /> |
| 82 |
|
| 83 |
<instantiate from="root/src/app_package/DrawerActivity.java.ftl" |
| 84 |
to="${escapeXmlAttribute(srcOut)}/${activityClass}.java" /> |
| 85 |
<instantiate from="root/src/app_package/NavigationDrawerFragment.java.ftl" |
| 86 |
to="${escapeXmlAttribute(srcOut)}/NavigationDrawerFragment.java" /> |
| 87 |
|
| 88 |
<open file="${escapeXmlAttribute(srcOut)}/${activityClass}.java" /> |
| 89 |
<open file="${escapeXmlAttribute(resOut)}/layout/${fragmentLayoutName}.xml" /> |
| 90 |
</#if> |
| 91 |
|
| 92 |
</recipe> |