-
Notifications
You must be signed in to change notification settings - Fork 110
Expand file tree
/
Copy pathrecipe.xml.ftl
More file actions
48 lines (40 loc) · 1.99 KB
/
recipe.xml.ftl
File metadata and controls
48 lines (40 loc) · 1.99 KB
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
<?xml version="1.0"?>
<recipe>
<#if appCompat && !(hasDependency('eu.inloop:androidviewmodel'))>
<dependency mavenUrl="eu.inloop:androidviewmodel:1.3.1"/>
</#if>
<#if screenType == "Fragment">
<instantiate from="src/app_package/layout.xml.ftl"
to="${escapeXmlAttribute(resOut)}/layout/${layoutName}.xml" />
<instantiate from="src/app_package/Fragment.java.ftl"
to="${escapeXmlAttribute(srcOut)}/${scrPackage}/${screenClass}.java" />
</#if>
<#if screenType == "BindingFragment">
<instantiate from="src/app_package/binding_layout.xml.ftl"
to="${escapeXmlAttribute(resOut)}/layout/${layoutName}.xml" />
<instantiate from="src/app_package/BindingFragment.java.ftl"
to="${escapeXmlAttribute(srcOut)}/${scrPackage}/${screenClass}.java" />
</#if>
<instantiate from="src/app_package/ViewModel.java.ftl"
to="${escapeXmlAttribute(srcOut)}/${vmPackage}/${viewModelClass}.java" />
<#if generateViewInterface>
<instantiate from="src/app_package/ViewInterface.java.ftl"
to="${escapeXmlAttribute(srcOut)}/${vPackage}/I${viewModelClass?replace('ViewModel', 'View')}.java" />
</#if>
<#if scrPackage != "">
<open file="${escapeXmlAttribute(srcOut)}/${scrPackage}/${screenClass}.java" />
<#else>
<open file="${escapeXmlAttribute(srcOut)}/${screenClass}.java" />
</#if>
<#if vmPackage != "">
<open file="${escapeXmlAttribute(srcOut)}/${vmPackage}/${viewModelClass}.java" />
<#else>
<open file="${escapeXmlAttribute(srcOut)}/${viewModelClass}.java" />
</#if>
<#if vPackage != "">
<open file="${escapeXmlAttribute(srcOut)}/${vPackage}/I${viewModelClass?replace('ViewModel', 'View')}.java" />
<#else>
<open file="${escapeXmlAttribute(srcOut)}/I${viewModelClass?replace('ViewModel', 'View')}.java" />
</#if>
<open file="${escapeXmlAttribute(resOut)}/layout/${layoutName}.xml" />
</recipe>