Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
hazae41 authored Apr 11, 2019
1 parent 6acbf1d commit 03f4d5a
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,35 @@ It includes Kotlin stdlib and a lot of tools for Minecraft plugins development.

[Go to JitPack](https://jitpack.io/#Hazae41/Kotlin4MC/master-SNAPSHOT)

# Getting started

To avoid classpath conflict, you need to use package relocation

Add the following **at the top** of your **build.gradle**

plugins {
id 'com.github.johnrengelman.shadow' version '4.0.2'
}

import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation
task relocateShadowJar(type: ConfigureShadowRelocation) {
target = tasks.shadowJar
prefix = rootProject.name
}

tasks.shadowJar {
classifier = 'bundle'
dependsOn tasks.relocateShadowJar
}

artifacts {
archives shadowJar
}

Then use the shadowJar task to build your jar

# Usage

### Simplified componentization

You can componentize and colorize any message
Expand Down Expand Up @@ -465,4 +494,4 @@ val delay = config.getLong("delay").not(0) // Assignment + Check
```kotlin
val delay = config.getLong("delay") // Assignment
if(delay == 0) return warning("Delay should not be 0") // Check
```
```

0 comments on commit 03f4d5a

Please sign in to comment.