Skip to content

Commit

Permalink
edit build script
Browse files Browse the repository at this point in the history
  • Loading branch information
toxicity188 committed Oct 1, 2023
1 parent 52b9aac commit 0a8e20f
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 16 deletions.
40 changes: 25 additions & 15 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ plugins {
id("org.jetbrains.kotlin.jvm") version("1.9.10")
id("com.github.johnrengelman.shadow") version("8.1.1")
id("maven-publish")
id("org.jetbrains.dokka") version("1.9.0")
}

val questAdderGroup = "kor.toxicity"
Expand Down Expand Up @@ -70,9 +71,11 @@ allprojects {
compileOnly("net.Indyuce:MMOItems-API:6.9.5-SNAPSHOT")
compileOnly("io.lumine:MythicLib-dist:1.6.2-SNAPSHOT")
compileOnly("com.github.BeYkeRYkt.LightAPI:lightapi-bukkit-common:5.3.0-Bukkit")

}
}
subprojects {
apply(plugin = "org.jetbrains.dokka")
}

dependencies {
implementation(project(path = ":nms:v1_17_R1", configuration = "shadow"))
Expand All @@ -89,20 +92,6 @@ dependencies {
val targetJavaVersion = 17

tasks {
jar {
finalizedBy(shadowJar)
}
shadowJar {
relocate("kotlin","kor.toxicity.questadder.shaded.kotlin")
relocate("com.ticxo.playeranimator","kor.toxicity.questadder.shaded.com.ticxo.playeranimator")
relocate("org.apache.commons.io","kor.toxicity.questadder.shaded.org.apache.commons.io")
relocate("net.objecthunter","kor.toxicity.questadder.shaded.net.objecthunter")
relocate("org.zeroturnaround","kor.toxicity.questadder.shaded.org.zeroturnaround")
relocate("org.bstats","kor.toxicity.questadder.shaded.org.bstats")
dependencies {
exclude(dependency("org.jetbrains:annotations:13.0"))
}
}
compileJava {
options.encoding = Charsets.UTF_8.name()
options.release.set(targetJavaVersion)
Expand All @@ -129,8 +118,29 @@ tasks {
events("passed")
}
}
jar {
finalizedBy(shadowJar)
archiveFileName.set("QuestAdder.jar")
}
shadowJar {
finalizedBy(dokkaHtmlMultiModule)
archiveFileName.set("QuestAdder.jar")
relocate("kotlin","kor.toxicity.questadder.shaded.kotlin")
relocate("com.ticxo.playeranimator","kor.toxicity.questadder.shaded.com.ticxo.playeranimator")
relocate("org.apache.commons.io","kor.toxicity.questadder.shaded.org.apache.commons.io")
relocate("net.objecthunter","kor.toxicity.questadder.shaded.net.objecthunter")
relocate("org.zeroturnaround","kor.toxicity.questadder.shaded.org.zeroturnaround")
relocate("org.bstats","kor.toxicity.questadder.shaded.org.bstats")
dependencies {
exclude(dependency("org.jetbrains:annotations:13.0"))
}
}
dokkaHtmlMultiModule {
outputDirectory.set(file("${layout.buildDirectory.get()}/dokka"))
}
}


java {
toolchain {
languageVersion = JavaLanguageVersion.of(targetJavaVersion)
Expand Down
2 changes: 2 additions & 0 deletions expansion/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.dokka.gradle.DokkaTaskPartial

dependencies {
compileOnly("com.github.PlaceholderAPI:PlaceholderAPI:master-SNAPSHOT")
compileOnly(project(":plugin"))
Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ systemProp.org.gradle.internal.http.socketTimeout=180000

org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.configureondemand=true
org.gradle.configureondemand=true
org.gradle.jvmargs=-Xmx16384m

0 comments on commit 0a8e20f

Please sign in to comment.