Skip to content

Gradle Setup

Reflxction edited this page Jul 16, 2021 · 2 revisions

To add Tuna-Bytes to your Maven project, follow these steps:

  1. Add and apply the shadow plugin
  2. Add jitpack.io to your repositories
  3. Add the correct artifact of the library to your dependencies
  4. Add Tuna-Bytes as an annotation processor
  5. Apply relocations to make sure no conflicts occur with other users of Tuna-Bytes

Note: Due to the many changes done to classloading semantics, classloading code has been abstracted across Java 8+ versions into modules. Therefore, the value of {artifact} in the examples below should be determined by the Java version you're going to run on. When unsure, you can include all versions and exclude the dependencies from them accordingly.

Your Java version Tuna-Bytes artifact
Java 8 java8
Java 9 / Java 10 java9
Java 11+ java11
plugins {
    id 'java'
    id 'com.github.johnrengelman.shadow' version '5.2.0'
}

repositories {
    maven { url 'https://jitpack.io' }
}

dependencies {
    implementation 'com.github.ReflxctionDev.Tuna-Bytes:{artifact}:1.0.0'
    annotationProcessor 'com.github.ReflxctionDev.Tuna-Bytes:{artifact}:1.0.0'
}

shadowJar {
    relocate 'io.tunabytes', '[YOUR PACKAGE].tunabytes'
}
Clone this wiki locally