libgdx / gdx-pay

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

Module reaarange for GWT support #56

Closed alex-dorokhov closed 9 years ago

alex-dorokhov commented 9 years ago

I found, that gdx-pay is not ready to be used with GWT. A project using gdx-pay just can't be compiled with GWT, because of using java reflections in PurchaseSystem. Libgdx provides ClassReflection utility to use reflections in cross-platform way. But in this case gdx-pay module will be dependent from libgdx, and then gdx-pay-server will also depend from libgdx. So I suggest to add additional module: gdx-pay-common, which will contain common classes for gdx-pay and gdx-pay-server, but will not depend from libgdx. So, gdx-pay-server will not depend from gdx-pay, but only from gdx-common. And gdx-pay will depend from libgdx. That will also simplify PurchaseSystem code. However it will make it impossible to use gdx-pay without libgdx. What do you think? Once you agree on the changes, I will implement them.

noblemaster commented 9 years ago

If I follow you correctly, you want to make gdx-pay the "client"-functionality (non-server). And then add a gdx-pay-common which is used both for server & client!?

I believe that's a good idea, but I would change the names:

In any case, all we would add is a gdx-pay-client which extends libgdx and is used by the clients. We can move relevant stuff over from gdx-pay to gdx-pay-client. If everyone prefers that, we can finally rename gdx-pay to gdx-pay-common.

I believe that would work nicely? Comments?

alex-dorokhov commented 9 years ago

That was my first idea also. I was just in doubt because renaming the module could cause troubles for existing users. But if there will be a message on the main page, then I would prefer to go with what you have described: gdx-pay, gdx-pay-client. I agree, this is more clear and more in style of libgdx.

In this case I guess the change should be released in 0.7.0-SNAPSHOT, to do not cause troubles for 0.6.0-SNAPSHOT users. Should I change the version in my pull request, or will you handle this somehow?

noblemaster commented 9 years ago

Great! I'd say let's just keep 0.6.0-SNAPSHOT for your pull request. After all it's a SNAPSHOT release.