Adding AnimationLib to your fabric gradle project - varun-liver/animationlib GitHub Wiki

To add AnimationLib to your Gradle project, you can either:

Option 1

Use a local jar file. You have to download it, and it doesn't auto update.

  1. Download the jar by going to "https://modrinth.com/mod/animation-lib" and downloading the latest mod version
  2. Move the jar file to build/libs
  3. Add this to build.gradle:
dependencies {
    implementation files("libs/animationlib-<animation-lib-version-you-installed>+mc<minecraft-version>.jar")
}
  1. Add this to fabric.mod.json:
"depends": {
    "animationlib": "*"
}

Option 2

Use a jar file from Modrinth's public repository.

  1. Add this code to your build.gradle:
repositories {
    maven { url = "https://api.modrinth.com/maven" }
}

dependencies {
    implementation "maven.modrinth:animationlib:<Animation-lib Version>+mc<Minecraft Version for Animationlib>"
}

To get the Animation Lib version and Minecraft version for Animation Lib, go to https://modrinth.com/mod/animation-lib 2. Add this to fabric.mod.json

"depends": {
    "animationlib": "*"
}