|
| 1 | +--- |
| 2 | +title: Repository |
| 3 | +description: How to add the PerWorlds API to your project. |
| 4 | +--- |
| 5 | + |
| 6 | +import { Tab, Tabs } from "fumadocs-ui/components/tabs" |
| 7 | +import { DynamicCodeBlock } from "fumadocs-ui/components/dynamic-codeblock" |
| 8 | +import { latestVersion } from "@/lib/api" |
| 9 | +export const version = await latestVersion("per-worlds") |
| 10 | + |
| 11 | +## Add our Repository |
| 12 | + |
| 13 | +To start, add our repository to your project: |
| 14 | + |
| 15 | +<Tabs defaultIndex='1' groupId="language" items={['Maven', 'Gradle Kotlin', 'Gradle Groovy', 'SBT']}> |
| 16 | + <Tab id="maven" value="Maven"> |
| 17 | + ```xml |
| 18 | + <repository> |
| 19 | + <id>thenextlvl-releases</id> |
| 20 | + <name>TheNextLvl</name> |
| 21 | + <url>https://repo.thenextlvl.net/releases</url> |
| 22 | + </repository> |
| 23 | + ``` |
| 24 | + </Tab> |
| 25 | + <Tab id="kotlin" value="Gradle Kotlin"> |
| 26 | + ```kts |
| 27 | + maven { |
| 28 | + name = "thenextlvlReleases" |
| 29 | + url = uri("https://repo.thenextlvl.net/releases") |
| 30 | + } |
| 31 | + ``` |
| 32 | + </Tab> |
| 33 | + <Tab id="groovy" value="Gradle Groovy"> |
| 34 | + ```groovy |
| 35 | + maven { |
| 36 | + name "thenextlvlReleases" |
| 37 | + url "https://repo.thenextlvl.net/releases" |
| 38 | + } |
| 39 | + ``` |
| 40 | + </Tab> |
| 41 | + <Tab id="sbt" value="SBT"> |
| 42 | + ```scala |
| 43 | + resolvers += |
| 44 | + "thenextlvl-releases" |
| 45 | + at "https://repo.thenextlvl.net/releases" |
| 46 | + ``` |
| 47 | + </Tab> |
| 48 | +</Tabs> |
| 49 | + |
| 50 | +## Add the PerWorlds API |
| 51 | + |
| 52 | +Add the PerWorlds API as a dependency: |
| 53 | + |
| 54 | +<Tabs |
| 55 | + defaultIndex="1" |
| 56 | + groupId="language" |
| 57 | + items={["Maven", "Gradle Kotlin", "Gradle Groovy", "SBT"]} |
| 58 | +> |
| 59 | + <Tab id="maven" value="Maven"> |
| 60 | + <DynamicCodeBlock |
| 61 | + lang="xml" |
| 62 | + code={`<dependency> |
| 63 | + <groupId>net.thenextlvl</groupId> |
| 64 | + <artifactId>per-worlds</artifactId> |
| 65 | + <version>${version}</version> |
| 66 | +</dependency>`} |
| 67 | + /> |
| 68 | + </Tab> |
| 69 | + <Tab id="kotlin" value="Gradle Kotlin"> |
| 70 | + <DynamicCodeBlock lang="kts" code={`implementation("net.thenextlvl:per-worlds:${version}")`} /> |
| 71 | + </Tab> |
| 72 | + <Tab id="groovy" value="Gradle Groovy"> |
| 73 | + <DynamicCodeBlock |
| 74 | + lang="groovy" |
| 75 | + code={`implementation "net.thenextlvl:per-worlds:${version}"`} |
| 76 | + /> |
| 77 | + </Tab> |
| 78 | + <Tab id="sbt" value="SBT"> |
| 79 | + <DynamicCodeBlock lang="scala" code={`"net.thenextlvl" %% "per-worlds" %% "${version}"`} /> |
| 80 | + </Tab> |
| 81 | +</Tabs> |
| 82 | + |
| 83 | +<Callout type="info" title="Note"> |
| 84 | + |
| 85 | +The version of the PerWorlds API is the same as the version of the PerWorlds plugin. |
| 86 | + You can find all versions on the [repository](https://repo.thenextlvl.net/#/releases/net/thenextlvl/per-worlds). |
| 87 | + |
| 88 | +</Callout> |
0 commit comments