Skip to content

Quick Start

Alberto Migliorato edited this page May 4, 2023 · 4 revisions

Adding PowerLib to your project

The API artifact is published to the CodeMC official repository.

Maven

If you're using Maven, simply add these lines to the repositories and dependencies section of your POM.

<repositories>
    <repository>
        <id>codemc-repo</id>
        <url>https://repo.codemc.org/repository/maven-public/</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>it.mycraft</groupId>
  	<artifactId>powerlib-<YOUR-PLATFORM></artifactId>
  	<version>1.2.3</version>
	<scope>provided</scope>
    </dependency>
</dependencies>

Gradle

If you're using Gradle, you need to add these lines to your build.gradle script.

repositories {
    maven {
        url "https://repo.codemc.org/repository/maven-public/"
    }
}

dependencies {
    compile 'it.mycraft:powerlib-<YOUR-PLATFORM>:1.2.3'
}

Manual

If you want to manually add the PowerLib dependency to your classpath, you can obtain the jar by:

  1. Navigating to the Releases' section;
  2. Selecting the version you wish to use;
  3. Downloading the jar titled PowerLib-x.x.x.jar;
  4. Importing it locally in your Java project.