VeryGoodOpenSource / very_good_templates

Collection of open-source templates created and maintained by Very Good Ventures.
61 stars 11 forks source link

style: AndroidManifest.xml's '<application' opening tag is indented by 3 spaces instead of 4 #125

Closed MrCsabaToth closed 3 months ago

MrCsabaToth commented 3 months ago

Description The generated AndroidManfiest.xml has one less space for the indentation of the <application opening tag, whereas the </application> closing tag has the proper four spaces.

Steps To Reproduce

  1. very_good create flutter_app my_app
  2. cd my_app/android/src/main/
  3. cat AndroidManfiest.xml
  4. 3rd line is the opening tag

Expected Behavior Both the opening and the closing tag would have four spaces of indentation

Exhibit

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.verygoodcore.my_app">
   <application
        android:label="${appName}"
        android:name="${applicationName}"
        android:icon="@mipmap/ic_launcher">
        <activity
            android:name=".MainActivity"
            android:exported="true"
            android:launchMode="singleTask"
            android:theme="@style/LaunchTheme"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
            android:hardwareAccelerated="true"
            android:windowSoftInputMode="adjustResize">
            <!-- Specifies an Android theme to apply to this Activity as soon as
                 the Android process has started. This theme is visible to the user
                 while the Flutter UI initializes. After that, this theme continues
                 to determine the Window background behind the Flutter UI. -->
            <meta-data
              android:name="io.flutter.embedding.android.NormalTheme"
              android:resource="@style/NormalTheme"
              />            
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
        <!-- Don't delete the meta-data below.
             This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
        <meta-data
            android:name="flutterEmbedding"
            android:value="2" />
    </application>
</manifest>

Requirements

MrCsabaToth commented 3 months ago

Note: transferred from https://github.com/VeryGoodOpenSource/very_good_cli/issues/1066 and https://github.com/VeryGoodOpenSource/very_good_cli/pull/1067

alestiago commented 3 months ago

Thanks @MrCsabaToth for the contribution 💙 !

Closing as completed, resolved by #126. We should try adding a formatter for non-Dart files, #127 is tracking the effort.