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

Update braintree_android to 4.33.0 #424

Merged
merged 1 commit into from
Jul 10, 2023

Conversation

khushboo18
Copy link
Contributor

@khushboo18 khushboo18 commented Jun 28, 2023

Thank you for your contribution to Braintree.

Before submitting this PR, note that we cannot accept language translation PRs. We support the same languages that are supported by PayPal, and have a dedicated localization team to provide the translations. If there is an error in a specific translation, you may open an issue and we will escalate it to the localization team.

Summary of changes

  • Update braintree_android version to 4.33.0

Checklist

  • Added a changelog entry

Authors

List GitHub usernames for everyone who contributed to this pull request.

  • khushboo18

@khushboo18
Copy link
Contributor Author

Seeing some failures while running rake locally but all those failures are seen on master as well.

Would appreciate any guidance around what else needs to be updated with this version bump!

@sshropshire
Copy link
Contributor

@khushboo18 which Rake task are you running and seeing errors for?

@khushboo18
Copy link
Contributor Author

khushboo18 commented Jun 29, 2023

@sshropshire I'm just trying to run rake as suggested in the Development guidelines. How do I check if I need to make any more changes/updates in this PR?

@jaxdesmarais
Copy link
Contributor

I just approved and ran CI on this branch and unit_tests are passing which means the failure are likely in the integration_tests when running rake. Are you able to share the specific integration test that are failing for you locally?

@khushboo18
Copy link
Contributor Author

@jaxdesmarais thanks! This is what some of the failure look like -

/braintree-android-drop-in/Drop-In/src/main/java/com/braintreepayments/api/DropInActivity.java:294: Error: AuthorizationCallback can only be accessed from within the same library group (referenced groupId=com.braintreepayments.api from groupId=braintree-android-drop-in) [RestrictedApi]
        dropInInternalClient.getAuthorization(new AuthorizationCallback() {
                                                  ~~~~~~~~~~~~~~~~~~~~~
/braintree-android-drop-in/Drop-In/src/main/java/com/braintreepayments/api/DropInActivity.java:296: Error: AuthorizationCallback.onAuthorizationResult can only be called from within the same library group (referenced groupId=com.braintreepayments.api from groupId=braintree-android-drop-in) [RestrictedApi]
            public void onAuthorizationResult(@Nullable Authorization authorization, @Nullable Exception authorizationError) {
                        ~~~~~~~~~~~~~~~~~~~~~
/braintree-android-drop-in/Drop-In/src/main/java/com/braintreepayments/api/DropInActivityResultContract.java:28: Error: Authorization.toString can only be called from within the same library group (referenced groupId=com.braintreepayments.api from groupId=braintree-android-drop-in) [RestrictedApi]
                .putExtra(EXTRA_AUTHORIZATION, input.getAuthorization().toString());
                                                                        ~~~~~~~~
/braintree-android-drop-in/Drop-In/src/main/java/com/braintreepayments/api/DropInActivityResultContract.java:39: Error: UserCanceledException can only be called from within the same library group (referenced groupId=com.braintreepayments.api from groupId=braintree-android-drop-in) [RestrictedApi]
            userCanceledResult.setError(new UserCanceledException("User canceled DropIn."));
                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/braintree-android-drop-in/Drop-In/src/main/java/com/braintreepayments/api/DropInClient.java:44: Error: IntegrationType.DROP_IN can only be accessed from within the same library group (referenced groupId=com.braintreepayments.api from groupId=braintree-android-drop-in) [RestrictedApi]
            braintreeClient = new BraintreeClient(context, clientTokenProvider, null, IntegrationType.DROP_IN);
                                                                                                      ~~~~~~~
/braintree-android-drop-in/Drop-In/src/main/java/com/braintreepayments/api/DropInClient.java:46: Error: IntegrationType.DROP_IN can only be accessed from within the same library group (referenced groupId=com.braintreepayments.api from groupId=braintree-android-drop-in) [RestrictedApi]
            braintreeClient = new BraintreeClient(context, authorization, null, IntegrationType.DROP_IN);
                                                                                                ~~~~~~~
/braintree-android-drop-in/Drop-In/src/main/java/com/braintreepayments/api/DropInClient.java:199: Error: BraintreeClient.getAuthorization can only be called from within the same library group (referenced groupId=com.braintreepayments.api from groupId=braintree-android-drop-in) [RestrictedApi]
        braintreeClient.getAuthorization(callback);
                        ~~~~~~~~~~~~~~~~
/braintree-android-drop-in/Drop-In/src/main/java/com/braintreepayments/api/DropInClient.java:213: Error: BraintreeClient.getSessionId can only be called from within the same library group (referenced groupId=com.braintreepayments.api from groupId=braintree-android-drop-in) [RestrictedApi]
                            new DropInIntentData(dropInRequest, authorization, braintreeClient.getSessionId());

...

And these same failures are showing on master so maybe something wrong with my local env?

@sshropshire
Copy link
Contributor

@khushboo18 I'm not seeing this error on my machine, but I can see how this error may be thrown I'm surprised this hasn't occurred before.

We do have some classes in our Core SDK annotated with @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) to discourage use by merchants. Technically it should be fine since DropIn also has a group ID of com.braintreepayments.api when we deploy to maven central.

Which version of Android Studio are you using? And also what version of the JDK are you using to build?

@khushboo18
Copy link
Contributor Author

khushboo18 commented Jul 5, 2023

@sshropshire I'm not using Android Studio for this, I was just running it from my terminal.

openjdk version "11.0.16.1" 2022-07-19 LTS
OpenJDK Runtime Environment Zulu11.58+23-CA (build 11.0.16.1+1-LTS)
OpenJDK 64-Bit Server VM Zulu11.58+23-CA (build 11.0.16.1+1-LTS, mixed mode)

Will run it on android studio and update

Update: same failure on android studio as well, version Android Studio Electric Eel | 2022.1.1 Patch 1

@sshropshire
Copy link
Contributor

Ok I'm using the same 2022.2.1 Android Studio version. Can you try it with JDK 17 for good measure?

@khushboo18
Copy link
Contributor Author

Gave that a try, same errors with JDK version "17.0.7".
@sshropshire if its passing for you locally and all the unit tests are passing on CI, could we go ahead and merge this?
Something could just be wrong with my local environment since I'm seeing the same issues on master as well.

@sshropshire sshropshire marked this pull request as ready for review July 5, 2023 21:51
@sshropshire sshropshire requested a review from a team as a code owner July 5, 2023 21:51
@sshropshire
Copy link
Contributor

@khushboo18 I can give it a 👍 once CI passes. We can wait on the other 👍 and merge.

@sshropshire sshropshire merged commit 1f28149 into braintree:master Jul 10, 2023
1 check passed
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