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

Refactor example app build config keys #1505

Merged
merged 8 commits into from
Mar 11, 2024
Merged

Conversation

jreij
Copy link
Collaborator

@jreij jreij commented Mar 7, 2024

Description

Improvements to the example app build config (related to #1486):

  • Rename default.local.gradle to example.local.gradle.
  • Fail purposefully on first build to make sure the example.local.gradle file is copied and its placeholders are replaced with the actual values.
  • Rename API_KEY to AUTHORIZATION_HEADER and redact it from logs.
  • Make the authorization header and merchant account optional for implementations that handle those on the server.
  • Move shopper reference out of build config and add it as a default value to settings.
  • Display default value of merchant account in settings screen.

How to migrate

If you already had set up the example app, this PR will cause your build to fail. To migrate go to example-app/local.gradle and follow these steps:

  • Rename API_KEY_HEADER_NAME to AUTHORIZATION_HEADER_NAME.
  • Rename CHECKOUT_API_KEY to AUTHORIZATION_HEADER_VALUE.
  • Remove SHOPPER_REFERENCE line. It will now default to "test-android-components", you can change that value in the settings screen if you want.
  • Remove unnecessary quote symbol escaping: "\"SOME_VALUE\"" can be replaced with '"SOME_VALUE"'.

Checklist

  • Changes are tested manually

COAND-831

@jreij jreij requested a review from a team as a code owner March 7, 2024 11:39
@jreij jreij force-pushed the refactor/example_app_secrets branch 2 times, most recently from cbb08ae to 0fe89b2 Compare March 8, 2024 13:20
This was linked to issues Mar 8, 2024
@OscarSpruit OscarSpruit force-pushed the refactor/example_app_secrets branch 2 times, most recently from bd1bfdc to ddb206d Compare March 8, 2024 15:39
araratthehero
araratthehero previously approved these changes Mar 11, 2024
Copy link
Contributor

@araratthehero araratthehero left a comment

Choose a reason for hiding this comment

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

Looks good to me!

example-app/README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Copy link

sonarcloud bot commented Mar 11, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@jreij
Copy link
Collaborator Author

jreij commented Mar 11, 2024

@OscarSpruit all good from my side but I can't approve my own PR 😅 If you are happy with my changes from the first 7 commits please approve.

@jreij jreij merged commit 1fabf21 into develop Mar 11, 2024
8 checks passed
@jreij jreij deleted the refactor/example_app_secrets branch March 11, 2024 14:59
@jreij jreij mentioned this pull request Mar 11, 2024
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.

Project set up Add readme for example-app setup
3 participants