summaryrefslogtreecommitdiff
path: root/build.gradle.kts
diff options
context:
space:
mode:
authorDico200 <dico.karssiens@gmail.com>2018-07-22 07:12:53 +0200
committerDico200 <dico.karssiens@gmail.com>2018-07-22 07:12:53 +0200
commit9f81a74bd9e89541448bf79d73d0b9bc297e72ee (patch)
treed32eb5e641bf8f81c172d866fdf05d22018c08ba /build.gradle.kts
parentdbcc90ac8a938e9098dc93206f061cc2a4765ad6 (diff)
port RedstonerPlots a bit
Diffstat (limited to 'build.gradle.kts')
-rw-r--r--build.gradle.kts59
1 files changed, 50 insertions, 9 deletions
diff --git a/build.gradle.kts b/build.gradle.kts
index ccb3622..fe71506 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,7 +1,14 @@
+import com.github.jengelman.gradle.plugins.shadow.relocation.RelocateClassContext
+import com.github.jengelman.gradle.plugins.shadow.relocation.RelocatePathContext
+import com.github.jengelman.gradle.plugins.shadow.relocation.Relocator
+import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
+import com.github.jengelman.gradle.plugins.shadow.transformers.TransformerContext
import org.jetbrains.kotlin.gradle.dsl.Coroutines
+import shadow.org.apache.tools.zip.ZipOutputStream
plugins {
kotlin("jvm") version "1.2.51"
+ id("com.github.johnrengelman.plugin-shadow") version "2.0.3"
}
group = "io.dico"
@@ -9,24 +16,58 @@ version = "0.1"
repositories {
mavenCentral()
+ mavenLocal()
maven("https://dl.bintray.com/kotlin/exposed")
}
kotlin.experimental.coroutines = Coroutines.ENABLE
dependencies {
- compile(files("../res/spigot-1.13-pre7.jar"))
compile(kotlin("stdlib-jdk8"))
+
+ shadow(files("../res/spigot-1.13-pre7.jar"))
+
+ compile("io.dico.dicore:dicore3-core:1.2-mc-1.13")
+ compile("io.dico.dicore:dicore3-command:1.2-mc-1.13")
+
compile("org.jetbrains.exposed:exposed:0.10.3")
compile("org.jetbrains.kotlinx:kotlinx-coroutines-core:0.23.4")
+ compile("com.zaxxer:HikariCP:3.2.0")
+
+ val jacksonVersion = "2.9.6"
+ compile("com.fasterxml.jackson.core:jackson-core:$jacksonVersion")
+ compile("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")
+ compile("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:$jacksonVersion")
+ compile("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion")
+
+ compile("org.slf4j:slf4j-api:1.7.25")
+ compile("ch.qos.logback:logback-classic:1.2.3")
+
testCompile("junit:junit:4.12")
}
-val jar by tasks.getting(Jar::class)
-val fatJar by tasks.creating(Jar::class) {
- baseName = "parcels2-all"
- manifest.attributes["Main-Class"] = ""
- destinationDir = file("debug/plugins")
- from(*configurations.compile.map(::zipTree).toTypedArray())
- with(jar)
-}
+tasks {
+ val jar by getting(Jar::class)
+
+ val fatJar by creating(Jar::class) {
+ destinationDir = file("$rootDir/debug/plugins")
+ baseName = "parcels2-all"
+ from(*configurations.compile.map(::zipTree).toTypedArray())
+ with(jar)
+ }
+
+ val shadowJar by getting(ShadowJar::class) {
+ destinationDir = file("$rootDir/debug/plugins")
+ baseName = "parcels2-shaded"
+
+ dependencies {
+ exclude(dependency(files("../res/spigot-1.13-pre7.jar")))
+ }
+
+ relocate("", "io.dico.parcels2.util.") {
+ exclude("META-INF/*")
+ exclude("logback*")
+ exclude("plugin*")
+ }
+ }
+} \ No newline at end of file