blob: 68500486dfb839ab6572c28c597c2184cde4d693 [file] [log] [blame]
#
# Test how FQCN class names are expanded and handled:
# - A library application can be merged doesn't have an app class name.
# - A library application can be merged if it has the same class name as the app.
# - A partial class name is expanded using the package name in a library or app.
#
# All tests fail with just warnings, no solid errors.
#
@main
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.app1"
android:versionCode="100"
android:versionName="1.0.0">
<application
android:name="TheApp"
android:backupAgent=".MyBackupAgent"
tools:replace="name, backupAgent">
<activity android:name=".MainActivity" />
<receiver android:name="AppReceiver" />
<activity android:name="com.example.lib2.LibActivity" />
</application>
</manifest>
@lib1_widget
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.lib1">
<!-- App name is different, will not merge. -->
<application>
<activity android:name=".WidgetLibrary1" />
</application>
</manifest>
@lib2_widget
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.lib2">
<!-- App name is good, but backupAgent is mentioned and is different, will not merge. -->
<application
android:name="com.example.app1.TheApp"
android:backupAgent=".MyBackupAgent" >
<activity android:name=".WidgetLibrary2" />
<activity android:name=".LibActivity" />
</application>
</manifest>
@lib3_widget
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.lib3">
<application android:name="com.example.app1.TheApp">
<activity android:name=".WidgetLibrary3" />
</application>
</manifest>
@lib4_not_package
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- It's an error for the manifest to lack a 'package' attribute.
We just emit a warning in this case.
-->
<application>
<!-- These class name can't be expanded due to the lack of 'package' attribute. -->
<activity android:name=".LibActivity4" />
<service android:name=".LibService4" />
<receiver android:name=".LibReceiver4" />
<provider android:name=".LibProvider4" />
</application>
</manifest>
@result
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.app1"
android:versionCode="100"
android:versionName="1.0.0">
<application
android:name="com.example.app1.TheApp"
android:backupAgent="com.example.app1.MyBackupAgent" >
<activity android:name="com.example.app1.MainActivity" />
<receiver android:name="com.example.app1.AppReceiver" />
<activity android:name="com.example.lib2.LibActivity" />
<activity android:name="com.example.lib1.WidgetLibrary1" />
<activity android:name="com.example.lib2.WidgetLibrary2" />
<activity android:name="com.example.lib3.WidgetLibrary3" />
# from @lib4_alias
<!-- These class name can't be expanded due to the lack of 'package' attribute. -->
<activity android:name=".LibActivity4" />
<service android:name=".LibService4" />
<receiver android:name=".LibReceiver4" />
<provider android:name=".LibProvider4" />
</application>
</manifest>
@errors
WARNING:Missing 'package' declaration in manifest at ManifestMerger2Test4_lib4_not_package.xml:1:1-15:12