Closed mustii82 closed 8 years ago
There is gradle support! Did you read the Wiki?
The Wiki just contains Maven integration
I have also had a ton of trouble getting this working with gradle. I managed to get android, ios, and desktop builds to work, but my html build still throws errors:
[ERROR] Line 20: No source code is available for type com.badlogic.gdx.pay.PurchaseObserver; did you forget to inherit a required module? [ERROR] Line 21: No source code is available for type com.badlogic.gdx.pay.PurchaseManagerConfig; did you forget to inherit a required module?
I've posted about it on the libgdx forums here: http://www.badlogicgames.com/forum/viewtopic.php?f=11&t=22703
A small Update on the Wiki with Gradle integration would help.
Improved README a bit. Remaining issues:
What do you think?
@psiegel I have never used GWT. Maybe gdx-pay support for GWT is currently broken?
Is it possible to create a small Github project that reproduces the issue?
I also added to README.md instructoins to use a locally build gdx-pay in a project. Makes trying out changes in gdx-pay a lot easier. See: https://github.com/libgdx/gdx-pay#user-content-using-gdx-pay-locally-build-binaries-in-a-project
Why not do both: we give the option to (a) use dependency management or (b) use jars directly whatever developers prefer?
I agree, listing Gradle & Maven dependencies makes sense. I am not much of a Gradle/Maven expert though.
re-GWT: that's currently just an empty stub that does nothing. It needs implementation.
Why not do both: we give the option to (a) use dependency management or (b) use jars directly whatever developers prefer?
Using jars is error-prone, some people forget some of the jars, and blame gdx-pay for ClassNotFound exceptions.
If we use Google as an example (e.g. https://firebase.google.com/docs/storage/android/start ), they just mention the Gradle dependency statements.
If it is still relevant for our users, we should keep it. So now we have at least one important user who needs it :)?
Finally found how to do this with gradle: http://www.badlogicgames.com/forum/viewtopic.php?f=11&t=22343&p=92098&hilit=pay#p92098
Strange that info like that isn't in README.
The README.md has been extended and now includes instructions for usage with Gradle. The other way to do it (by downloading jars manually) is still there.
If the instructions are not sufficient, please feel free to open a new issue.
Relevant changes in README.md below:
Configure dependencies using Gradle
project-root/build.gradle:
ext {
gdxPayVersion = '0.10.3'
}
core:
dependencies {
compile "com.badlogicgames.gdxpay:gdx-pay-client:$gdxPayVersion"
}
android:
dependencies {
compile "com.badlogicgames.gdxpay:gdx-pay-android:$gdxPayVersion"
compile "com.badlogicgames.gdxpay:gdx-pay-android-googleplay:${gdxPayVersion}@aar"
}
ios:
dependencies {
compile "com.badlogicgames.gdxpay:gdx-pay-iosrobovm-apple:$gdxPayVersion"
}
Adding the '@aar' suffix to the dependency is the right way to do it.
If you still think gdx-pay is doing it wrong, feel free to open a new issue.
Please add grade support to this Library most LibGDX Projects are working with Gradle.