Template cleanup

This commit is contained in:
Feodor Fitsner 2024-10-06 17:08:15 -07:00
parent 81d6931fa7
commit fcfb51b0f3
5 changed files with 43 additions and 31 deletions

View File

@ -1,16 +1,11 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> <manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- {% for k, v in cookiecutter.options.android_permissions.items() %} {% if v == True %}--> <!-- flet: permission {% for k, v in cookiecutter.options.android_permissions.items() %} {% if v == True %} -->
<uses-permission android:name="{{ k }}" /> <uses-permission android:name="{{ k }}" />
<!-- {% endif %} {% endfor %} --> <!-- flet: enf of permission {% endif %} {% endfor %} -->
<!-- {% for k, v in cookiecutter.options.android_features.items() %} --> <!-- flet: feature {% for k, v in cookiecutter.options.android_features.items() %} -->
<uses-feature android:name="{{ k }}" <uses-feature android:name="{{ k }}" android:required="{% if v == True %}true{% else %}false{% endif %}" />
android:required="{% if v == True %}true{% else %}false{% endif %}" /> <!-- flet: end of feature {% endfor %} -->
<!-- {% endfor %} -->
<!-- Google TV -->
<uses-feature android:name="android.software.leanback" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
<application <application
android:label="{{ cookiecutter.product_name }}" android:label="{{ cookiecutter.product_name }}"
@ -41,7 +36,7 @@
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" /> <!-- Google TV --> <category android:name="android.intent.category.LEANBACK_LAUNCHER" /> <!-- Google TV -->
</intent-filter> </intent-filter>
<!-- {% if cookiecutter.options.deep_linking_url %} --> <!-- flet: deep linking {% if cookiecutter.options.deep_linking_url %} -->
<meta-data android:name="flutter_deeplinking_enabled" android:value="true" /> <meta-data android:name="flutter_deeplinking_enabled" android:value="true" />
<intent-filter> <intent-filter>
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />
@ -50,7 +45,7 @@
<data android:scheme="{{ cookiecutter.options.deep_linking_url.scheme }}" <data android:scheme="{{ cookiecutter.options.deep_linking_url.scheme }}"
android:host="{{ cookiecutter.options.deep_linking_url.netloc }}" /> android:host="{{ cookiecutter.options.deep_linking_url.netloc }}" />
</intent-filter> </intent-filter>
<!-- {% endif %} --> <!-- flet: end of deep linking {% endif %} -->
</activity> </activity>
<!-- Don't delete the meta-data below. <!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java --> This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->

View File

@ -50,14 +50,31 @@
<key>NSAllowsArbitraryLoads</key> <key>NSAllowsArbitraryLoads</key>
<true /> <true />
</dict> </dict>
<!-- {% for k, v in cookiecutter.options.info_plist.items() %} --> <!-- flet: deep linking {% if cookiecutter.options.deep_linking_url %} -->
<key>{{ k }}</key> <key>FlutterDeepLinkingEnabled</key>
<!-- {% if v == True %} -->
<true /> <true />
<!-- {% elif v == False %} --> <key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>{{ cookiecutter.options.deep_linking_url.netloc }}</string>
<key>CFBundleURLSchemes</key>
<array>
<string>{{ cookiecutter.options.deep_linking_url.scheme }}</string>
</array>
</dict>
</array>
<!-- flet: end of deep linking {% endif %} -->
<!-- flet: prop {% for k, v in cookiecutter.options.info_plist.items() %} -->
<key>{{ k }}</key>
<!-- flet: True {% if v == True %} -->
<true />
<!-- flet: False {% elif v == False %} -->
<false /> <false />
<!-- {% else %} --> <!-- flet: string value {% else %} -->
<string>{{ v }}</string> <string>{{ v }}</string>
<!-- {% endif %} {% endfor %} --> <!-- flet: end of prop {% endif %} {% endfor %} -->
</dict> </dict>
</plist> </plist>

View File

@ -2,12 +2,12 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<!-- {% for k, v in cookiecutter.options.macos_entitlements.items() %} --> <!-- flet: entitlement {% for k, v in cookiecutter.options.macos_entitlements.items() %} -->
<key>{{ k }}</key> <key>{{ k }}</key>
<!-- {% if v == True %} --> <!-- flet: True {% if v == True %} -->
<true /> <true />
<!-- {% elif v == False %} --> <!-- flet: False {% elif v == False %} -->
<false /> <false />
<!-- {% endif %} {% endfor %} --> <!-- flet: end of entitlement {% endif %} {% endfor %} -->
</dict> </dict>
</plist> </plist>

View File

@ -28,14 +28,14 @@
<string>MainMenu</string> <string>MainMenu</string>
<key>NSPrincipalClass</key> <key>NSPrincipalClass</key>
<string>NSApplication</string> <string>NSApplication</string>
<!-- {% for k, v in cookiecutter.options.info_plist.items() %} --> <!-- flet: prop {% for k, v in cookiecutter.options.info_plist.items() %} -->
<key>{{ k }}</key> <key>{{ k }}</key>
<!-- {% if v == True %} --> <!-- flet: True {% if v == True %} -->
<true /> <true />
<!-- {% elif v == False %} --> <!-- flet: False {% elif v == False %} -->
<false /> <false />
<!-- {% else %} --> <!-- flet: string value {% else %} -->
<string>{{ v }}</string> <string>{{ v }}</string>
<!-- {% endif %} {% endfor %} --> <!-- flet: end of prop {% endif %} {% endfor %} -->
</dict> </dict>
</plist> </plist>

View File

@ -2,12 +2,12 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<!-- {% for k, v in cookiecutter.options.macos_entitlements.items() %} --> <!-- flet: entitlement {% for k, v in cookiecutter.options.macos_entitlements.items() %} -->
<key>{{ k }}</key> <key>{{ k }}</key>
<!-- {% if v == True %} --> <!-- flet: True {% if v == True %} -->
<true /> <true />
<!-- {% elif v == False %} --> <!-- flet: False {% elif v == False %} -->
<false /> <false />
<!-- {% endif %} {% endfor %} --> <!-- flet: end of entitlement {% endif %} {% endfor %} -->
</dict> </dict>
</plist> </plist>