Where I am exactly after finding some info :
I'm new to the gradle concept and so, I'm kind of lost at the moment. I coulnd find any tutorial for Intellij, most of them are for Eclipse. Some help will be really appreciated =)
EDIT 1 :
After a few more hours of test, this is what i got.
Import the project created with the Libgdx's Setup with the advanced option "IDEA" checked into Intellij. (Load Gradle via the popup when intellij starts) [Is this really needed ?]
Set up BaseGameUtils :
Move BaseGameUtils folder into the root folder of your project. Add BaseGameUtils as a module into your project. Add the google-play-service.jar to the BaseGameUtils module.
Set up the Android Project :
Add BaseGameUtils to the Android project as a module dependency
This is where I'm getting lost :
Create an interface in the core project, add to it the functions located in the BaseGameActivity. Make the Android project's main class "AndroidLauncher.java" implements GameServiceInterface and the GameHelperListener. Add to the Android project's main class "AndroidLauncher.java" the missing Methods.
There is a tutorial on libgdx wiki.
Installing the "Google Play Repository" from Android SDK manager should be enough. There is no need to move the google-play-services_lib folder.
My android project definition in root/bulild.gradle:
project(":android") {
apply plugin: "android"
configurations { natives }
dependencies {
compile project(":core")
compile project(":libraries:BaseGameUtils")
compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi"
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi-v7a"
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86"
compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi"
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi-v7a"
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86"
compile 'com.android.support:appcompat-v7:20.0.+'
compile 'com.android.support:support-v4:20.0.+'
compile 'com.google.android.gms:play-services:5.0+'
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With