Skip to content

Instantly share code, notes, and snippets.

@ktvipin27
Last active May 29, 2020
Embed
What would you like to do?
Sample recipe.xml.ftl file
<?xml version="1.0"?>
<recipe>
<merge from="root/res/values/strings.xml.ftl"
to="${escapeXmlAttribute(resOut)}/values/strings.xml" />
<merge from="root/AndroidManifest.xml.ftl"
to="${escapeXmlAttribute(manifestOut)}/AndroidManifest.xml" />
<instantiate from="root/src/app_package/Activity.kt.ftl"
to="${escapeXmlAttribute(srcOut)}/${activityClass}.kt" />
<instantiate from="root/src/app_package/ViewModel.kt.ftl"
to="${escapeXmlAttribute(srcOut)}/${viewModelClass}.kt" />
<instantiate from="root/res/layout/activity.xml.ftl"
to="${escapeXmlAttribute(resOut)}/layout/${layoutName}.xml" />
<open file="${escapeXmlAttribute(resOut)}/layout/${layoutName}.xml" />
<open file="${escapeXmlAttribute(srcOut)}/${viewModelClass}.kt" />
<open file="${escapeXmlAttribute(srcOut)}/${activityClass}.kt" />
</recipe>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment