Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

manifest package name rewriting #94

Open
dbachelder opened this issue Mar 22, 2014 · 2 comments
Open

manifest package name rewriting #94

dbachelder opened this issue Mar 22, 2014 · 2 comments
Milestone

Comments

@dbachelder
Copy link
Contributor

do you think there is an easy win to facilitate changing namespace based on build variant package names like in the manifest snippet below where com.namespace.local could be com.namespace.test or com.namespace.prod depending on the build variant... currently gradle takes care of replacing namespace in the <manifest packag="com.namespace" with whatever the variant specifies. but the rest needs to either be done through some custom groovy or via manifest merging, neither option is particularly appealing.

    <uses-permission android:name="com.namespace.local.permission.C2D_MESSAGE" t:tag="+,n"/>
...
    <permission android:name="com.namespace.local.permission.C2D_MESSAGE" android:protectionLevel="signature" t:tag="+,n,p"/>
...
<receiver android:name=".gcm.PushReceiverBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND" t:tag="+,n,p">
            <intent-filter t:tag="+">
                <action android:name="com.google.android.c2dm.intent.RECEIVE"/>
                <category android:name="com.namespace.local" t:tag="+,n"/>
            </intent-filter>
        </receiver>

@johncarl81
Copy link
Owner

Hmm, we could introduce a build parameter... can you describe the use case further? I'm not sure I understand.

@dbachelder
Copy link
Contributor Author

Basically, you need certain permissions and categories to match the package name of the app. but the package name is determined at build time and the permissions and categories are hard coded in the source.

@johncarl81 johncarl81 added this to the 0.3.0 Release milestone Aug 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants