libgdx / gdx-pay

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

Gradle Error with latest snapshot #108

Closed Trurl101 closed 7 years ago

Trurl101 commented 8 years ago

Since yesterday I got this error in gradle:

Error:Module 'com.badlogicgames.gdxpay:gdx-pay-android-googleplay:0.10.0-SNAPSHOT' depends on one or more Android Libraries but is a jar

psiegel commented 8 years ago

I'm seeing this too. Is there a work-around?

psiegel commented 8 years ago

Figured out a work-around. Changed my android project's dependency line from: compile "com.badlogicgames.gdxpay:gdx-pay-android-googleplay:$gdxPayVersion" to: compile("com.badlogicgames.gdxpay:gdx-pay-android-googleplay:$gdxPayVersion") { exclude group: 'com.android.support', module: 'support-v4' }

keesvandieren commented 7 years ago

I investigated this issue, and added Gradle instructions to the project README.md.

Instructions added to README.md:

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.