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

[Docs] Add Cardinal SDK Code Snippet for Top-level build.gradle File #198

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion docs/PayPalNativePayments/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,30 @@ The order created on your server will be used to authorize or capture funds. For

### 1. Add the PayPal Native Payments module to your app

In your `build.gradle` file, add the following dependency:
In your app's `build.gradle` file, add the following dependency:
Copy link
Contributor

Choose a reason for hiding this comment

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

I think with newer gradle versions / new project setups it's recommended that this goes in settings.gradle. Not sure if we want to differ from existing docs here but could update all our docs around Cardinal inclusion to be more modern (ref: https://saucelabs.com/resources/blog/how-to-prefer-settings-gradle-repositories-over-build-gradle). Either way is fine by me

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We should go for the newer way eventually. I've always been hesitant to update build.gradle files but it's something we should definitely address to make sure we're aligned with Android best practices.


```groovy
dependencies {
implementation "com.paypal.android:paypal-native-payments:<CURRENT-VERSION>"
}
```

Also, add the following to your project's top-level `build.gradle` file:

```groovy
allprojects {
repositories {
maven {
url "https://cardinalcommerceprod.jfrog.io/artifactory/android"
credentials {
username "paypal_sgerritz"
password "AKCp8jQ8tAahqpT5JjZ4FRP2mW7GMoFZ674kGqHmupTesKeAY2G8NcmPKLuTxTGkKjDLRzDUQ"
}
}
}
}
```

### 2. Sample App Preparation

In order to integrate PayPal native payments, you will need:
Expand Down
Loading