libgdx / gdx-pay

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

gdx-pay jar and gdx-pay-client jar version 0.7 both have class com.badlogic.gdx.pay.PurchaseObserver #75

Closed keesvandieren closed 8 years ago

keesvandieren commented 8 years ago

Version 0.7 of gdx-pay have class com.badlogic.gdx.pay.PurchaseObserver in gdx-pay and gdx-pay-client.

As gdx-pay-client depends on gdx-pay, the class is always twice on classpath.

That makes version 0.7 unusable on Android. It fails because of this, with the following error: com.android.dex.DexException: Multiple dex files define Lcom/badlogic/gdx/pay/PurchaseObserver;

See class in maven artifacts of version 0.7:

http://search.maven.org/#search%7Cga%7C1%7Cfc%3A%22com.badlogic.gdx.pay.PurchaseObserver%22

The class used to be in gdx-pay, but is moved to gdx-pay-client in version 0.6 (0.6 also does not have this class in gdx-pay).

noblemaster commented 8 years ago

You are correct - please use the SNAPSHOT build instead! The duplicate PurchaseObserver class is gone in the SNAPSHOT build & it should work just fine.

keesvandieren commented 8 years ago

Using snapshots is not an option for us; we need to have a reproducible build, so we cannot use snapshot dependencies.

Hope it to be possible to have a 0.8 release soon that has the issue fixed?

(Root cause for this may be that there is still a PurchaseObserver.class in gdx-pay/build, e.g. that gradle clean never has been executed there?)

noblemaster commented 8 years ago

Just released a new 0.8.0 - let me know how it goes!

jtuta commented 8 years ago

App compiles with 0.8.0, I think you fixed this.

keesvandieren commented 8 years ago

0.8.0 is fine. Thanks for fixing it!

noblemaster commented 8 years ago

Great - you guys owe me a beer :-P

By the way, am I the only one that can do release-builds? If someone is interested please contact me! It's not difficult and it doesn't event take that much time. Sorry for the late build that finally worked...

alex-dorokhov commented 8 years ago

possibly we could make it even easier with using gradle-release-plugin (https://github.com/researchgate/gradle-release). then just calling "./gradlew release" can do most of the work

keesvandieren commented 8 years ago

What are the requirements to do a release? Is a Mac needed to release, or can it be done from Linux or Windows workstation as well?

noblemaster commented 8 years ago

Yes, I am using gradle to create release builds. It's not much work at all. Also, you still need to go to sonatype to release & also need to update the repository to indicate that a new release is up.

re-build: yes, you'll need a Mac to build it. I think there might be a way to create release-build on Windows/Linux as well, but I think they last time I tried it didn't work.