Update readme.md
This commit is contained in:
130
readme.md
130
readme.md
@@ -10,135 +10,7 @@ Currently I'm not actively working on this project, but it's not abandoned! If y
|
||||
|
||||
## Dependency
|
||||
|
||||
<details>
|
||||
<summary><b>Gradle (Kotlin-Script)</b></summary>
|
||||
<p>
|
||||
|
||||
**The repositories:**
|
||||
```kotlin
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
maven("https://jitpack.io")
|
||||
```
|
||||
|
||||
**The dependency:**
|
||||
|
||||
```kotlin
|
||||
implementation("net.axay", "KSpigot", "VERSION_HERE")
|
||||
```
|
||||
|
||||
</p>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>Gradle (Groovy)</b></summary>
|
||||
<p>
|
||||
|
||||
**The repositories:**
|
||||
```groovy
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
maven { url 'https://jitpack.io' }
|
||||
```
|
||||
|
||||
**The dependency:**
|
||||
|
||||
```groovy
|
||||
implementation 'net.axay:KSpigot:VERSION_HERE'
|
||||
```
|
||||
|
||||
</p>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>Maven</b></summary>
|
||||
<p>
|
||||
|
||||
**The repositories:**
|
||||
```xml
|
||||
<repository>
|
||||
<id>jcenter</id>
|
||||
<name>jcenter</name>
|
||||
<url>https://jcenter.bintray.com</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>jitpack.io</id>
|
||||
<url>https://jitpack.io</url>
|
||||
</repository>
|
||||
```
|
||||
|
||||
**The dependency:**
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>net.axay</groupId>
|
||||
<artifactId>KSpigot</artifactId>
|
||||
<version>VERSION_HERE</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
</p>
|
||||
</details>
|
||||
|
||||
If you work with KSpigot, you also need Spigot as a dependency.
|
||||
|
||||
## Building your project
|
||||
|
||||
<details>
|
||||
<summary><b>Read before building your project!</b></summary>
|
||||
<p>
|
||||
|
||||
You **must** use a shade / shadow plugin with your build system. KSpigot needs to be relocated.
|
||||
|
||||
#### GRADLE
|
||||
|
||||
The plugin:
|
||||
```kotlin
|
||||
id("com.github.johnrengelman.shadow") version "6.0.0"
|
||||
```
|
||||
|
||||
Now KSpigot needs to be relocated by using one of the following methods:
|
||||
|
||||
<details>
|
||||
<summary><b>Relocate only KSpigot</b></summary>
|
||||
<p>
|
||||
|
||||
Add the following to your buildscript:
|
||||
```kotlin
|
||||
tasks {
|
||||
shadowJar {
|
||||
relocate("net.axay.kspigot", "${project.group}.shadow.net.axay.kspigot")
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
</p>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>Relocate all of your dependencies</b></summary>
|
||||
<p>
|
||||
|
||||
Add the following to your buildscript:
|
||||
```kotlin
|
||||
val relocateShadowJar by tasks.creating(ConfigureShadowRelocation::class) {
|
||||
target = tasks.shadowJar.get()
|
||||
prefix = "${project.group}.shadow"
|
||||
}
|
||||
|
||||
tasks.shadowJar.get().dependsOn(relocateShadowJar)
|
||||
```
|
||||
|
||||
</p>
|
||||
</details>
|
||||
|
||||
Now use the `shadowJar` task to build your project.
|
||||
|
||||
#### MAVEN
|
||||
|
||||
For example, you could use the [Apache Maven Shade Plugin](https://maven.apache.org/plugins/maven-shade-plugin/examples/class-relocation.html).
|
||||
|
||||
</p>
|
||||
</details>
|
||||
Read the [guide](https://bluefireoly.gitbook.io/kspigot/) to get started!
|
||||
|
||||
## About
|
||||
|
||||
|
Reference in New Issue
Block a user