In an android library's manifest file, if I try to use the the built in placeholder "applicationId" in the manifest it injects the package name of the library instead of the package name of the parent application.
Example library manifest:
<?xml version="1.0" encoding="utf-8"?>
android:versionCode="1"
package="com.example.what"
android:versionName="1.0">
<application>
<receiver
android:name=".GCMPushReceiver"
android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE"/>
<action android:name="com.google.android.c2dm.intent.REGISTRATION"/>
<category android:name="${applicationId}"/>
</intent-filter>
</receiver>
<receiver
android:name=".ADMPushReceiver"
android:permission="com.amazon.device.messaging.permission.SEND">
<intent-filter>
<action android:name="com.amazon.device.messaging.intent.RECEIVE"/>
<action android:name="com.amazon.device.messaging.intent.REGISTRATION"/>
<category android:name="${applicationId}"/>
</intent-filter>
</receiver>
</application>
</manifest>
Will replace all instances of ${applicationId} as com.example.what instead of the parent application. If I try to add a custom placeholder value and define in the parent applications build.gradle it results in a build error: Manifest merger failed : Attribute category#${parentApplicationId}@name at AndroidManifest.xml:46:27 requires a placeholder substitution but no value for <parentApplicationId> is provided.
Is there a way to work around this other than having the parent application define the elements in its own manifest? It would be very helpful to allow the library manifests to be automatically configured in the parent application.