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

Only inject manifest placeholders if there are no defaults #791

Merged
merged 1 commit into from
Jul 15, 2019
Merged

Only inject manifest placeholders if there are no defaults #791

merged 1 commit into from
Jul 15, 2019

Conversation

sonicdoe
Copy link
Contributor

@sonicdoe sonicdoe commented Jul 4, 2019

If defaultConfig would have manifest placeholders, it would still have overridden the defaults by injecting the manifest placeholders into all build types.

For example, if I define manifestPlaceholders = [onesignal_app_id: "foo"] in defaultConfig and run assembleDebug, the resulting AndroidManifest.xml contains an empty onesignal_app_id (taken from MANIFEST_PLACEHOLDERS_DEFAULTS).

With this change, onesignal_app_id in AndroidManifest.xml would correctly contain foo.

If `defaultConfig` would have manifest placeholders, it would still have overridden the defaults by injecting the manifest placeholders into all build types. Fixes usage of `onesignal_app_id` via `manifestPlaceholders` in `defaultConfig`.
Copy link
Member

@jkasten2 jkasten2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

If there are defaults defined we shouldn't set specific buildType too, since they would be overriding the defaults already set in the project. So I see your change now prevents this.

@jkasten2 jkasten2 merged commit 43312fd into OneSignal:master Jul 15, 2019
@sonicdoe sonicdoe deleted the manifest-placeholders branch July 15, 2019 06:16
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

Successfully merging this pull request may close these issues.

3 participants