Skip to content

General Library Integration

Anton Chekulaev edited this page Jun 18, 2020 · 11 revisions

There are various ways the library can be included in the project. They have different pros and cons and are sorted in order of convenience.

A. Maven dependency

The library's stable releases are available through maven central repo.

Add it in your root build.gradle at the end of repositories:

allprojects {
    repositories {
        mavenCentral()
    }
}

Add the dependencies:

dependencies {
    api 'com.crashinvaders.vfx:gdx-vfx-core:0.5.0'
    api 'com.crashinvaders.vfx:gdx-vfx-effects:0.5.0'    // Optional, if you need standard filter/effects.
}

B. Local JAR artifacts

Download JAR artifacts from releases page and attach them to the project. Put the downloaded gdx-vfx-core.jar and gdx-vfx-effects.jar into /core/libs dir and add them as dependencies.

/core/build.gradle:

dependencies {
    // ...
    api fileTree(dir: 'libs', include: ['*.jar'])
}

C. Local maven archetype (useful for local build/testing)

  1. Clone the repository into a local directory.
git clone https://github.com/crashinvaders/gdx-vfx.git
  1. Install local maven archetype using gradle task (maven should be installed on the system and added to the PATH).
./gradlew gdx-vfx:core:install gdx-vfx:effects:install gdx-vfx:gwt:install
  1. Include the library from a local maven repository.

/core/build.gradle:

repositories {
    // ...
    mavenLocal()
}

dependencies {
    // ...
    api "com.crashinvaders.vfx:gdx-vfx-core:0.+"
    api "com.crashinvaders.vfx:gdx-vfx-effects:0.+"
}