| # |
| # Test merge of uses-library: |
| # - Merge is OK if destination already has one with the same @name. |
| # - required defaults to "true" |
| # - when merging, a required=true (explicit or implicit) overwrites a required=false. |
| # |
| |
| @fails |
| |
| @main |
| |
| <manifest |
| xmlns:android="http://schemas.android.com/apk/res/android" |
| package="com.example.app1" |
| android:versionCode="100" |
| android:versionName="1.0.0"> |
| |
| <application |
| android:label="@string/app_name" |
| android:icon="@drawable/app_icon" |
| android:backupAgent="com.example.app.BackupAgentClass" |
| android:restoreAnyVersion="true" |
| android:allowBackup="true" |
| android:killAfterRestore="true" |
| android:name="com.example.TheApp" > |
| |
| <!-- A library that is implicitly marked as required=true --> |
| <uses-library |
| android:name="com.example.SomeLibrary0_DefaultTrue" /> |
| |
| <!-- A library that is implicitly marked as required=true --> |
| <uses-library |
| android:name="com.example.SomeLibrary1_DefaultTrue" /> |
| |
| <!-- A library that is explicitly marked as required=true --> |
| <uses-library |
| android:name="com.example.SomeLibrary2_RequiredTrue" |
| android:required="booh!" /> |
| |
| <!-- A library that is explicitly marked as required=false --> |
| <uses-library |
| android:name="com.example.SomeLibrary3_RequiredFalse" |
| android:required="false" /> |
| |
| <!-- Duplicated with different attribute values --> |
| <uses-library |
| android:name="com.example.SomeLibrary3_RequiredFalse" |
| android:required="true" /> |
| |
| <!-- A library that is explicitly marked as required=false --> |
| <uses-library |
| android:name="com.example.SomeLibrary4_RequiredFalse" |
| android:required="false" /> |
| |
| </application> |
| |
| </manifest> |
| |
| @errors |
| |
| ERROR:Attribute uses-library#com.example.SomeLibrary2_RequiredTrue@required at ManifestMerger2Test0_main.xml:27:13 has an illegal value=(booh!), expected 'true' or 'false' |
| ERROR:Element uses-library#com.example.SomeLibrary3_RequiredFalse at ManifestMerger2Test0_main.xml:35:9 duplicated with element declared at ManifestMerger2Test0_main.xml:30:9 |
| ERROR:Validation failed, exiting |