libgdx / gdx-pay

A libGDX cross-platform API for InApp purchasing.
Apache License 2.0
225 stars 83 forks source link

gdx-pay-android-amazon: Fix project setup #170

Closed MrStahlfelge closed 5 years ago

MrStahlfelge commented 6 years ago

It was not possible to import gdx-pay-android-amazon with gradle because it was no Android library project.

Hence, the following error was thrown when running a game using PurchaseManagerAndroidAmazon:

java.lang.NoClassDefFoundError: com.badlogic.gdx.pay.android.amazon.PurchaseManagerAndroidAmazon

This commit fixes the project setup.

keesvandieren commented 6 years ago

The Android lint fails on the project. Can you try to fix that?

MrStahlfelge commented 6 years ago

I added ignore flags to the manifest. The manifest entry is correct how it is, Lint just don't know about Amazon.

MrStahlfelge commented 6 years ago

I added some further commits because entitlements where just not working and install() was called to early. I did not use an own branch for these fixes because they are not possible to use without this branch here.

MrStahlfelge commented 5 years ago

Hi, you are right about the warnings.

My goal was to get the project going in the first place without changing much of the existing codebase. Please review my changes to the lib, I did not introduce these problems. I must point out that the current stable version is not useable with Gradle and it does not work with Entitlements. It would be a big step to merge these fixes before improving the comments in code that does not affect the usability of the lib. :-)

keesvandieren commented 5 years ago

Just merged :-)

MrStahlfelge commented 5 years ago

Thank you. I will take a look on your remarks and other warnings in the lib soon!

MrStahlfelge commented 5 years ago

Hi again, most things were already done in my own branch. I have added some of your other remarks, too: https://github.com/MrStahlfelge/gdx-pay/tree/mrstahlfelge

Problem is again, this branch depends on changes I made for the googlebilling implementation so it can't get pulled before reviewing googlebilling. Sorry. ;-)

keesvandieren commented 5 years ago

I just merged the other PR as well. Looking forward to further contributions :-).

Regarding Google Billing client: if you have the time / ability, can you add some unit tests? View Google Play implementation for an idea of how to achieve this.

Thanks in advance!

MrStahlfelge commented 5 years ago

I will take a look!