Git Product home page Git Product logo

Comments (11)

lkorth avatar lkorth commented on May 24, 2024

Thanks for sharing what worked for you. We'll test it out and work on adding it to the documentation.

For reference, the PayPal proguard config is available in the PayPal Android SDK repo.

from braintree_android.

lkorth avatar lkorth commented on May 24, 2024

@eveliotc, thanks for the report. This was fixed in 1.5.1. ProGuard will no longer break the SDK and we've also documented the rules that should be added for ProGuard builds to prevent warnings.

from braintree_android.

plastiv avatar plastiv commented on May 24, 2024

With compile "com.braintreepayments.api:braintree:2.1.0" depending on

compile 'com.google.android.gms:play-services-wallet:8.3.0'
compile 'com.braintreepayments.api:data-collector:2.1.0'

Is it safe to just ignore missing code with

-dontwarn com.google.android.gms.**
-dontwarn com.devicecollector.**

Or you are expecting us to bundle wallet and devicecollector dependency when using braintree?

from braintree_android.

lkorth avatar lkorth commented on May 24, 2024

The proguard rules we have currently documented only include -dontwarn com.google.android.gms.**. Are you receiving warnings for com.devicecollector.* as well?

from braintree_android.

plastiv avatar plastiv commented on May 24, 2024

From this guide: https://developers.braintreepayments.com/guides/client-sdk/android/v2#gradle
I get an impression that it is only needed to add next dependency:

compile 'com.braintreepayments.api:braintree:2.+'

With enabled proguard assembleRelease triggers next warnings:

Initializing...
Warning: com.braintreepayments.api.DataCollector$1$1: can't find superclass or interface com.devicecollector.DeviceCollector$StatusListener
Warning: com.braintreepayments.api.DataCollector$1: can't find referenced class com.devicecollector.DeviceCollector
Warning: com.braintreepayments.api.DataCollector$1: can't find referenced class com.devicecollector.DeviceCollector
Warning: com.braintreepayments.api.DataCollector$1: can't find referenced class com.devicecollector.DeviceCollector
Warning: com.braintreepayments.api.DataCollector$1: can't find referenced class com.devicecollector.DeviceCollector
Warning: com.braintreepayments.api.DataCollector$1: can't find referenced class com.devicecollector.DeviceCollector
Warning: com.braintreepayments.api.DataCollector$1: can't find referenced class com.devicecollector.DeviceCollector
Warning: com.braintreepayments.api.DataCollector$1: can't find referenced class com.devicecollector.DeviceCollector$StatusListener
Warning: com.braintreepayments.api.DataCollector$1: can't find referenced class com.devicecollector.DeviceCollector
Warning: com.braintreepayments.api.DataCollector$1$1: can't find referenced class com.devicecollector.DeviceCollector$StatusListener
Warning: com.braintreepayments.api.DataCollector$1$1: can't find referenced class com.devicecollector.DeviceCollector$ErrorCode
Warning: com.braintreepayments.api.DataCollector$1$1: can't find referenced class com.devicecollector.DeviceCollector
Warning: com.braintreepayments.api.DataCollector$1$1: can't find referenced class com.devicecollector.DeviceCollector$ErrorCode
Warning: com.braintreepayments.api.DataCollector$1$1: can't find referenced class com.devicecollector.DeviceCollector$ErrorCode
Warning: there were 14 unresolved references to classes or interfaces.
         You may need to add missing library jars or update their versions.
         If your code works fine without the missing classes, you can suppress
         the warnings with '-dontwarn' options.
         (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass)
Warning: Exception while processing task java.io.IOException: Please correct the above warnings first.

This is not triggred by the sample project here at the braintree source code, because it also includes Drop-In dependency which have compile 'com.braintreepayments.api:data-collector:2.1.0' dependency:
https://github.com/braintree/braintree_android/blob/master/Demo/build.gradle#L60

Question is: is it safe to ignore com.devicecollector.* references when compiling project only with com.braintreepayments.api:braintree:2.1.0?

from braintree_android.

lkorth avatar lkorth commented on May 24, 2024

Yes, just add -dontwarn com.devicecollector.** to your Proguard Config. I'll update the documentation.

from braintree_android.

makk909 avatar makk909 commented on May 24, 2024

I am still getting the same error as posted above while using proguard. The only dependency, I have included is this onecompile 'com.braintreepayments.api:drop-in:3.0.0' . I even tried ignoring warnings by adding this line -dontwarn com.devicecollector.** in the proguard but nothing helped. I didn't find any documentation for 3.0.0 as well and it's specifically mentioned that we don't need any proguard rules but then why this error?

from braintree_android.

lkorth avatar lkorth commented on May 24, 2024

@makk909 Please see #123 and #124, a release has not been made yet, the change to the proguard file is only on master.

from braintree_android.

makk909 avatar makk909 commented on May 24, 2024

That's fine but when I am manually ingoring this in my project proguard file even then it doesn't work. Shall I use this -dontwarn com.braintreepayments.api.DataCollector.** for ignoring all warnings when proguard is enabled? Hoping it's not going to cause any issue with the library. Right?

from braintree_android.

lkorth avatar lkorth commented on May 24, 2024

The directive you're looking for is actually -dontwarn com.kount.**

from braintree_android.

makk909 avatar makk909 commented on May 24, 2024

Oh thanks. it looks it works :)

On Mon, Oct 24, 2016 at 7:57 PM, Luke Korth [email protected]
wrote:

The directive you're looking for is actually -dontwarn com.kount.**
https://github.com/braintree/braintree_android/blob/e8c0e15003c907b7f455f8e72b2fc6f0aa36e914/Braintree/proguard.pro


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#29 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGtAWPU_H9EnxHtaHPuLxUw0NGDD0TAyks5q3MBQgaJpZM4EP0zJ
.

from braintree_android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.