-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathrecipe.xml.ftl
executable file
·105 lines (57 loc) · 3.4 KB
/
recipe.xml.ftl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?xml version="1.0"?>
<recipe>
<#if !(hasDependency('com.android.support:appcompat-v7'))>
<dependency mavenUrl="com.android.support:appcompat-v7:${buildApi}.+"/>
</#if>
<#if !(hasDependency('com.android.support:design'))>
<dependency mavenUrl="com.android.support:design:${buildApi}.+"/>
</#if>
<!-- <dependency mavenUrl="com.jakewharton:butterknife:8.5.1"/> -->
<!-- <dependency mavenUrl="com.jakewharton:butterknife-compiler:8.5.1"/> -->
<merge from="AndroidManifest.xml.ftl"
to="${escapeXmlAttribute(manifestOut)}/AndroidManifest.xml" />
<merge from="res/values/strings.xml.ftl"
to="${escapeXmlAttribute(resOut)}/values/strings.xml" />
<#if isToolbar>
<merge from="res/values/styles.xml.ftl"
to="${escapeXmlAttribute(resOut)}/values/styles.xml" />
</#if>
<!-- Decide what kind of layout(s) to add -->
<instantiate from="res/layout/activity_tabs.xml.ftl"
to="${escapeXmlAttribute(resOut)}/layout/${layoutActivityName}.xml" />
<instantiate from="src/app_package/TabsActivity.java.ftl"
to="${escapeXmlAttribute(srcOut)}/${activityClass}.java" />
<open file="${escapeXmlAttribute(srcOut)}/${activityClass}.java" />
<instantiate from="src/app_package/FirstFragment.java.ftl"
to="${escapeXmlAttribute(srcOut)}/${tabName1}.java" />
<instantiate from="src/app_package/SecondFragment.java.ftl"
to="${escapeXmlAttribute(srcOut)}/${tabName2}.java" />
<instantiate from="src/app_package/ThirdFragment.java.ftl"
to="${escapeXmlAttribute(srcOut)}/${tabName3}.java" />
<instantiate from="res/layout/fragment_first.xml.ftl"
to="${escapeXmlAttribute(resOut)}/layout/${tabLayoutName1}.xml" />
<instantiate from="res/layout/fragment_second.xml.ftl"
to="${escapeXmlAttribute(resOut)}/layout/${tabLayoutName2}.xml" />
<instantiate from="res/layout/fragment_third.xml.ftl"
to="${escapeXmlAttribute(resOut)}/layout/${tabLayoutName3}.xml" />
<instantiate from="res/layout/view_tabs.xml.ftl"
to="${escapeXmlAttribute(resOut)}/layout/view_tabs.xml" />
<#if tabstyle == 'badgewithicons'>
<copy from="src/app_package/FirstFragment.java.ftl"
to="${escapeXmlAttribute(srcOut)}/${tabName1}.java" />
<copy from="res/drawable/view_badge_un_selected.xml.ftl"
to="${escapeXmlAttribute(resOut)}/drawable/view_badge_un_selected.xml" />
<copy from="res/drawable/view_badge_selected.xml.ftl"
to="${escapeXmlAttribute(resOut)}/drawable/view_badge_selected.xml" />
</#if>
<#if tabposition == 'bottom' && isFragmentHistory>
<instantiate from="src/app_package/FragNavController.java.ftl"
to="${escapeXmlAttribute(srcOut)}/FragNavController.java" />
<instantiate from="src/app_package/FragNavTransactionOptions.java.ftl"
to="${escapeXmlAttribute(srcOut)}/FragNavTransactionOptions.java" />
<instantiate from="src/app_package/FragmentHistory.java.ftl"
to="${escapeXmlAttribute(srcOut)}/FragmentHistory.java" />
<instantiate from="src/app_package/BaseFragment.java.ftl"
to="${escapeXmlAttribute(srcOut)}/BaseFragment.java" />
</#if>
</recipe>