-
Notifications
You must be signed in to change notification settings - Fork 14
/
build.gradle.kts
76 lines (59 loc) · 2.37 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import gg.essential.gradle.util.*
import gg.essential.gradle.util.RelocationTransform.Companion.registerRelocationAttribute
plugins {
`java-library`
`maven-publish`
id("gg.essential.defaults.java")
id("xyz.wagyourtail.jvmdowngrader") version "0.7.2"
}
group = "com.github.ReplayMod"
description = "ReplayStudio"
version = "master-SNAPSHOT"
java.toolchain.languageVersion.set(JavaLanguageVersion.of(8))
repositories {
mavenCentral()
maven(url = "https://jitpack.io")
maven(url = "https://repo.viaversion.com")
maven(url = "https://oss.sonatype.org/content/repositories/snapshots/")
maven(url = "https://jitpack.io")
}
val relocated = registerRelocationAttribute("viaversion-relocated") {
relocate("io.netty", "com.github.steveice10.netty")
relocate("us.myles.ViaVersion.api", "com.replaymod.replaystudio.lib.viaversion.legacyapi")
relocate("com.viaversion.viaversion", "com.replaymod.replaystudio.lib.viaversion")
relocate("com.google.common", "com.replaymod.replaystudio.lib.guava")
}
val viaVersion by configurations.creating {
attributes { attribute(relocated, true) }
jvmdg.dg(this)
}
dependencies {
viaVersion("com.github.replaymod.viaversion:viaversion-common:df0e2b7db")
viaVersion("com.google.guava:guava:17.0")
implementation("com.google.code.gson:gson:2.3.1")
implementation("it.unimi.dsi:fastutil:8.3.1") // this is the version MC ships with 1.14.4, upgrade with care
implementation("com.github.viaversion:opennbt:0a02214") // 2.0-SNAPSHOT (ViaVersion Edition)
viaVersion("com.github.steveice10:packetlib:614d56cdc0" /* 1.3 */) {
exclude("org.slf4j")
}
implementation("org.apache.commons:commons-lang3:3.3.2")
implementation("org.apache.commons:commons-collections4:4.0")
implementation("commons-cli:commons-cli:1.2")
implementation(prebundle(viaVersion))
compileOnly(annotationProcessor("org.projectlombok:lombok:1.18.32")!!)
testImplementation("junit:junit:4.11")
testImplementation("com.google.guava:guava-testlib:18.0")
testImplementation("pl.pragmatists:JUnitParams:1.0.4")
}
tasks.jar {
from(viaVersion.files.map { zipTree(it) })
}
jvmdg.shadePath.set { "com/replaymod/replaystudio/lib" }
publishing {
publications {
register<MavenPublication>("maven") {
from(components["java"])
}
}
}
defaultTasks.add("publishToMavenLocal")