Skip to content

Instantly share code, notes, and snippets.

@ktvipin27
Last active May 29, 2020 07:17
Show Gist options
  • Save ktvipin27/8bfb091ef4bd654eef6c5757d7614112 to your computer and use it in GitHub Desktop.
Save ktvipin27/8bfb091ef4bd654eef6c5757d7614112 to your computer and use it in GitHub Desktop.
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