| 1 |
<globals> |
| 2 |
<#assign theme=getApplicationTheme()!{ "name": "AppTheme", "isAppCompat": true }> |
| 3 |
<#assign themeName=theme.name!'AppTheme'> |
| 4 |
<#assign themeNameNoActionBar=theme.nameNoActionBar!'AppTheme.NoActionBar'> |
| 5 |
<#assign appCompat=backwardsCompatibility!(theme.isAppCompat)!false> |
| 6 |
<#assign appCompatActivity=appCompat && (buildApi gte 22)> |
| 7 |
<#assign espresso=hasDependency('com.android.support.test.espresso:espresso-core', 'androidTestCompile')> |
| 8 |
<#assign supportRunner=hasDependency('com.android.support.test:runner', 'androidTestCompile')> |
| 9 |
<#assign testSupportLib=espresso && supportRunner> |
| 10 |
|
| 11 |
<global id="themeName" type="string" value="${themeName}" /> |
| 12 |
<global id="implicitParentTheme" type="boolean" value="${(themeNameNoActionBar?starts_with(themeName+'.'))?string}" /> |
| 13 |
<global id="themeNameNoActionBar" type="string" value="${themeNameNoActionBar}" /> |
| 14 |
<global id="themeExistsNoActionBar" type="boolean" value="${(theme.existsNoActionBar!false)?string}" /> |
| 15 |
<global id="themeNameAppBarOverlay" type="string" value="${theme.nameAppBarOverlay!'AppTheme.AppBarOverlay'}" /> |
| 16 |
<global id="themeExistsAppBarOverlay" type="boolean" value="${(theme.existsAppBarOverlay!false)?string}" /> |
| 17 |
<global id="themeNamePopupOverlay" type="string" value="${theme.namePopupOverlay!'AppTheme.PopupOverlay'}" /> |
| 18 |
<global id="themeExistsPopupOverlay" type="boolean" value="${(theme.existsPopupOverlay!false)?string}" /> |
| 19 |
|
| 20 |
<global id="appCompat" type="boolean" value="${appCompat?string}" /> |
| 21 |
<global id="appCompatActivity" type="boolean" value="${appCompatActivity?string}" /> |
| 22 |
<global id="hasAppBar" type="boolean" value="${appCompatActivity?string}" /> |
| 23 |
<global id="hasNoActionBar" type="boolean" value="${appCompatActivity?string}" /> |
| 24 |
<global id="testSupportLib" type="boolean" value="${testSupportLib?string}" /> |
| 25 |
|
| 26 |
<global id="manifestOut" value="${manifestDir}" /> |
| 27 |
<global id="buildVersion" value="${buildApi}" /> |
| 28 |
|
| 29 |
<#if !appCompat> |
| 30 |
<global id="superClass" type="string" value="Activity"/> |
| 31 |
<global id="superClassFqcn" type="string" value="android.app.Activity"/> |
| 32 |
<global id="Support" value="" /> |
| 33 |
<global id="actionBarClassFqcn" type = "string" value="android.app.ActionBar" /> |
| 34 |
<#elseif appCompatActivity> |
| 35 |
<global id="superClass" type="string" value="AppCompatActivity"/> |
| 36 |
<global id="superClassFqcn" type="string" value="android.support.v7.app.AppCompatActivity"/> |
| 37 |
<global id="Support" value="Support" /> |
| 38 |
<global id="actionBarClassFqcn" type = "string" value="android.support.v7.app.ActionBar" /> |
| 39 |
<#else> |
| 40 |
<global id="superClass" type="string" value="ActionBarActivity"/> |
| 41 |
<global id="superClassFqcn" type="string" value="android.support.v7.app.ActionBarActivity"/> |
| 42 |
<global id="Support" value="Support" /> |
| 43 |
<global id="actionBarClassFqcn" type = "string" value="android.support.v7.app.ActionBar" /> |
| 44 |
</#if> |
| 45 |
|
| 46 |
<global id="srcOut" value="${srcDir}/${slashedPackageName(packageName)}" /> |
| 47 |
<global id="resOut" value="${resDir}" /> |
| 48 |
<global id="menuName" value="${classToResource(activityClass!'')}" /> |
| 49 |
<global id="simpleName" value="${activityToLayout(activityClass!'')}" /> |
| 50 |
<global id="relativePackage" value="<#if relativePackage?has_content>${relativePackage}<#else>${packageName}</#if>" /> |
| 51 |
</globals> |