-
Notifications
You must be signed in to change notification settings - Fork 330
Gradle Setup
The PokeGOAPI-Java API is hosted on the jcenter()
maven repository. To import you will first need to add that to your repositories.
repositories {
jcenter()
}
Next, you will need to add the library to your dependencies
block.
dependencies {
compile 'com.pokegoapi:PokeGOAPI-library:x.x.x'
}
x.x.x
refers to the current version, when adding this to your buildscript you should replace this with the latest version of the API.
❗️ The API on maven may not be up to date with the latest Pokemon GO version, to ensure you have the latest version of this library, you should build from source and add the built JAR as explained below.
There are multiple ways you can import a jar into your Gradle project, and the ones listed here are not the only ways you can use to import a local jar.
You can import from the file path:
dependencies {
compile files('relative/path/to/file.jar')
}
You can add a 'libs' directory as a repository:
repositories {
flatDir {
dirs 'libs'
}
}
dependencies {
compile name: 'PokeGOAPI-library-all-x.x.x.jar'
}
Once again, x.x.x
can be replaced by the version of your built jar.
For this to work, your built jar file would need to be in project_root/libs/