jamesmontemagno / vsts-mobile-tasks

VSTS Tasks for Mobile!
MIT License
79 stars 22 forks source link

Nested android:label is not updated in AndroidManifest.xml #34

Open AlirezaInGitHub opened 4 years ago

AlirezaInGitHub commented 4 years ago

So here is my AndroidManifest.xml:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.someapp">

    <uses-permission android:name="android.permission.INTERNET" />

    <application
      android:name=".MainApplication"
      android:label="@string/app_name"
      android:icon="@mipmap/ic_launcher"
      android:allowBackup="false"
      android:theme="@style/AppTheme">
      <activity
        android:name=".MainActivity"
        android:label="@string/app_name"
        android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
        android:windowSoftInputMode="adjustResize">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
      </activity>
      <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
    </application>

</manifest>

As you can see there are two elements having android:label: <application> and <activity>. The task fails to update the second one which affects the app name on phone screen. The agent I run the build is:

pool:
  vmImage: 'macOS-10.14'

PS: I took a look at the code. This is where additional checks are needed to be added: https://github.com/jamesmontemagno/vsts-mobile-tasks/blob/ea6806bf24f3c7391ee74c69620fbfe98d4e8434/tasks/AndroidPackageName/task.ts#L67